ZBlogException::GetInstance PHP Method

GetInstance() public static method

获取单一实例
public static GetInstance ( ) : ZBlogException
return ZBlogException
    public static function GetInstance()
    {
        if (!isset(self::$_zbe)) {
            self::$_zbe = new ZBlogException();
        }
        return self::$_zbe;
    }

Usage Example

Esempio n. 1
0
function shutdown_error_handler()
{
    if ($error = error_get_last()) {
        if ($error['type'] == E_NOTICE) {
            return true;
        }
        if ($error['type'] == E_STRICT) {
            return true;
        }
        if (defined('E_DEPRECATED') && $error['type'] == E_DEPRECATED) {
            return true;
        }
        //ob_clean();
        $zbe = ZBlogException::GetInstance();
        $zbe->ParseShutdown($error);
        $zbe->Display();
        die;
    }
}
All Usage Examples Of ZBlogException::GetInstance