[Phpcms-plugins-cvs] admin4phpCMS/modules/error class.module_error.php,1.1,1.2
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-05-30 18:04:21
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/error In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9898/modules/error Modified Files: class.module_error.php Log Message: restructuring of some files Index: class.module_error.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/error/class.module_error.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.module_error.php 28 May 2004 12:07:44 -0000 1.1 +++ class.module_error.php 30 May 2004 18:03:41 -0000 1.2 @@ -1,55 +1,23 @@ <?php - -require_once 'XML/Tree.php'; -class module_config extends module { - - var $configfile; +class module_error extends module { function init () { - $this->__registerEvent ('CONFIG_READ', 'doReadConfig'); - $this->__registerAction ('doReadConfig', 'readConfig'); - $this->__registerEvent ('CONFIG_GET', 'doGetConfig'); - $this->__registerAction ('doGetConfig', 'getConfig'); - $this->__registerEvent ('CONFIG_SAVE', 'doSaveConfig'); - $this->__registerAction ('doSaveConfig', 'saveConfig'); - $this->__registerEvent ('CONFIG_SET_FILE', 'doSetConfigFile'); - $this->__registerAction ('doSetConfigFile', 'setConfigFile'); - } - - function readConfig (&$actiondata) { - if (isset ($actiondata['configfile'])) { - $this->configfile = $actiondata ['configfile']; - } - - if (!isset($this->configfile)) { - $actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); - $this->__callEvent ('ERROR_NOTICE', $actiondata); - return false; - } - - if (!file_exists ($this->configfile)) { - unset ($this->configfile); - $actiondata = array ('errortext'=>'Konfigurationsdatei konnte nicht geladen werden!'); - $this->__callEvent ('ERROR_NOTICE', $actiondata); - return false; - } - - $XML =& new XML_Tree ($this->configfile); - $this->configdata =& $XML->getTreeFromFile (); - return true; + $this->_registerEvent ('ERROR_ABORT', 'doErrorAbort'); + $this->_registerAction ('doErrorAbort', 'errorAbort'); + $this->_registerEvent ('ERROR_NOTICE', 'doErrorNotice'); + $this->_registerAction ('doErrorNotice', 'errorNotice'); + $this->_registerAction ('doGetContents', 'displayError'); } - function getConfig (&$actiondata) { - $actiondata['config'] =& $this->configdata; - return true; + function errorAbort (&$actiondata) { + $this->_error [] = $actiondata; } - function saveConfig (&$actiondata) { - + function errorNotice (&$actiondata) { + $this->_error [] = $actiondata; } - - function setConfigFile (&$actiondata) { - $this->configfile = $actiondata['configfile']; + + function displayError (&$actiondata) { } } |