/** * register a new error level * * This allows you to add custom error levels to the built-in * - E_NOTICE * - E_WARNING * - E_NOTICE * * You may use this level in subsequent calls to raise(). * Error handling will be set to 'ignore' for the new level, you * may change it by using setErrorHandling(). * * You could be using PHP's predefined constants for error levels * or any other integer value. * * @access public * @param integer error level * @param string human-readable name * @return boolean true on success; false if the level already has been registered * @see raise(), setErrorHandling() * @link http://www.php.net/manual/en/function.error-reporting.php */ public static function registerErrorLevel($level, $name) { if (isset(self::$errorLevels[$level])) { return false; } self::$errorLevels[$level] = $name; patErrorManager::setErrorHandling($level, 'ignore'); return true; }
/** * register a new error level * * This allows you to add custom error levels to the built-in * - E_NOTICE * - E_WARNING * - E_NOTICE * * You may use this level in subsequent calls to raise(). * Error handling will be set to 'ignore' for the new level, you * may change it by using setErrorHandling(). * * You could be using PHP's predefined constants for error levels * or any other integer value. * * @access public * @param integer error level * @param string human-readable name * @return boolean true on success; false if the level already has been registered * @see raise(), setErrorHandling() * @link http://www.php.net/manual/en/function.error-reporting.php */ function registerErrorLevel($level, $name) { if (isset($GLOBALS['_pat_errorLevels'][$level])) { return false; } $GLOBALS['_pat_errorLevels'][$level] = $name; patErrorManager::setErrorHandling($level, 'ignore'); return true; }
<?php require_once _CFG_XML_PATERROR; patErrorManager::setErrorHandling(E_ALL, 'verbose'); require_once _CFG_XML_PATCONFIG; function xmlconfig_info() { $info["nombre"] = "XMLConfig"; $info["version"] = "1.0"; $info["grupo"] = "servicios"; $info["visible"] = "false"; return $info; } function xmlconfig_test() { $test = array(); $test[0] = true; $test[1] = "mod_xmlconfig test...<br>"; $test[1] .= "==================<br>"; if ($test[0]) { $test[1] .= "El módulo esta correctamente instalado<br>"; } return $test; } function xmlconfig_buscaid($id, $XML_RUTA) { $conf = new patConfiguration(); $conf->setConfigDir(_CFG_XML_CONFIG_DIR); $conf->parseConfigFile($XML_RUTA); $x = 0; for ($i = 1; $x < count($conf->getConfigValue()); $i++) {