/** * Constructor * @param string $pMessage error message * @param string $pLevel error level * @param array $pArgs arguments used by message */ public function __construct() { $args = \func_get_args(); $message = \array_shift($args); if (count($args) > 0) { parent::__construct(vsprintf($message, $args)); } else { parent::__construct($message); } if (CBootstrap::$PERMANENT_LOG) { if (CBootstrap::$STATUS == CBootstrap::STATUS_ACTIVE) { $joinPoint = new AOP\JoinPoints\CException($this); AOP\AFramework::weave(null, $joinPoint); } else { CBootstrap::log($this->getMessage()); } } }
/** * Destructor */ public function __destruct() { AOP\AFramework::weave($this, new AOP\JoinPoints\CDestructor(\get_class($this))); }