/** * @return F4h_TicketConverter_Log_Container */ public static function getInstance() { if (!self::$instance) { self::$instance = new F4h_TicketConverter_Log_Container(); } return self::$instance; }
/** * @param Exception $exception */ public static function trap(Exception $exception) { $container = F4h_TicketConverter_Log_Container::getInstance(); $code = $exception->getCode(); switch ($code) { case self::FATAL: $container->addFatal($exception); break; case self::WARNING: $container->addWarning($exception); break; case self::NOTICE: $container->addNotice($exception); break; case self::UNKNOWN: $container->addUnknown($exception); break; } if (F4h_TicketConverter_Config::LOGGING === 1) { self::log($exception); } }