From 8d8e90c8ff0c11d72ffe8c5e94852f3f9ae4e167 Mon Sep 17 00:00:00 2001 From: "haertl.mike" <> Date: Wed, 29 Oct 2008 15:38:40 +0000 Subject: Fixed issue #48 (trac #941) --- framework/Util/TLogRouter.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php index acaab047..f55b7620 100644 --- a/framework/Util/TLogRouter.php +++ b/framework/Util/TLogRouter.php @@ -95,6 +95,20 @@ class TLogRouter extends TModule } } + /** + * Adds a TLogRoute instance to the log router. + * + * @param TLogRoute $route + * @throws TInvalidDataTypeException if the route object is invalid + */ + public function addRoute($route) + { + if(!($route instanceof TLogRoute)) + throw new TInvalidDataTypeException('logrouter_routetype_invalid'); + $this->_routes[]=$route; + $route->init(null); + } + /** * @return string external configuration file. Defaults to null. */ @@ -106,7 +120,7 @@ class TLogRouter extends TModule /** * @param string external configuration file in namespace format. The file * must be suffixed with '.xml'. - * @throws TInvalidDataValueException if the file is invalid. + * @throws TConfigurationException if the file is invalid. */ public function setConfigFile($value) { -- cgit v1.2.3