summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaertl.mike <>2008-10-29 15:38:40 +0000
committerhaertl.mike <>2008-10-29 15:38:40 +0000
commit8d8e90c8ff0c11d72ffe8c5e94852f3f9ae4e167 (patch)
tree86f1598fd0811c2d875048af15994c8b40ef21dd
parent105b449cf7de18b6610d46bf9234f55c8d7204c1 (diff)
Fixed issue #48 (trac #941)
-rw-r--r--HISTORY1
-rw-r--r--framework/Util/TLogRouter.php16
2 files changed, 16 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 37c3dabc..cb4ad56b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -44,6 +44,7 @@ ENH: Ticket#901 - Using TDbDataReader directly as a DataSource of TDataBoundCont
ENH: Ticket#911 - prado-cli: Better error message if database connection fails when generating Active Record skeletons (Knut)
ENH: Ticket#913 - PRADO Copyright notice in HTML source (Carl)
ENH: Ticket#925 - TTimeTriggeredCallback update interval during callback (Brad, Christophe)
+ENH: Ticket#941 - Add addRoute() method to TLogRouter (Michael)
NEW: Added Prado.Validation.validateControl(id) on client side to validate a specific control (Michael)
NEW: Added MessageSource_Database to I18N (uses TDbConnection) (Michael)
NEW: Ticket#790 - Added TActiveFileUpload (Bradley, Christophe)
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)
{