summaryrefslogtreecommitdiff
path: root/framework/Util/TLogRouter.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Util/TLogRouter.php')
-rw-r--r--framework/Util/TLogRouter.php16
1 files changed, 15 insertions, 1 deletions
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
@@ -96,6 +96,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.
*/
public function getConfigFile()
@@ -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)
{