summaryrefslogtreecommitdiff
path: root/framework/Exceptions/TErrorHandler.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Exceptions/TErrorHandler.php')
-rw-r--r--framework/Exceptions/TErrorHandler.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/framework/Exceptions/TErrorHandler.php b/framework/Exceptions/TErrorHandler.php
new file mode 100644
index 00000000..458d3169
--- /dev/null
+++ b/framework/Exceptions/TErrorHandler.php
@@ -0,0 +1,48 @@
+<?php
+
+class TErrorHandler extends TComponent implements IErrorHandler
+{
+ /**
+ * @var string module ID
+ */
+ private $_id;
+ /**
+ * @var boolean whether the module is initialized
+ */
+ private $_initialized=false;
+
+ /**
+ * Initializes the module.
+ * This method is required by IModule and is invoked by application.
+ * @param IApplication application
+ * @param TXmlElement module configuration
+ */
+ public function init($application,$config)
+ {
+ $application->attachEventHandler('Error',array($this,'handle'));
+ $this->_initialized=true;
+ }
+
+ /**
+ * @return string id of this module
+ */
+ public function getID()
+ {
+ return $this->_id;
+ }
+
+ /**
+ * @param string id of this module
+ */
+ public function setID($value)
+ {
+ $this->_id=$value;
+ }
+
+ public function handle($sender,$param)
+ { echo '...........................';
+ echo $param;
+ }
+}
+
+?> \ No newline at end of file