0
1
Fork 0
hedera-web-mindshore/usr/share/hedera-web/php/vn/error.php

35 lines
621 B
PHP
Raw Normal View History

2014-05-09 12:19:53 +00:00
<?php
class Error
{
static $logPhp = TRUE;
static $handler = NULL;
static function trigger ($domain, $code, $message)
{
if (self::$handler != NULL)
call_user_func (self::$handler, $domain, $code, $message);
// else
// trigger_error ($str, E_USER_WARNING);
}
static function logPhp ($enable)
{
self::$logPhp = $enable;
}
static function phpHandler ($code, $message, $file, $line, $context)
{
// if (self::$logPhp)
// Error::trigger ('PHP', $code, $message);
}
static function setHandler ($handler)
{
self::$handler = $handler;
set_error_handler ('Error::phpHandler', E_ALL);
}
}
?>