public function handle($level, $message, $file, $line, $context)
    {
        if ( $this->level === 0 ) return true;

        if ( $level & (E_USER_DEPRECATED | E_DEPRECATED) ) {
            if (self::$logger !== null) {
                if ( version_compare(PHP_VERSION, '5.4', '<') ) {
                    $stack = array_slice(debug_backtrace(false), 0, 10);
                } else {
                    $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
                }

                self::$logger->warning($message, array(
                    'type' => self::TYPE_DEPRECATION,
                    'stack' => $stack
                ));
            }

            return true;
        }

        if ( error_reporting() & $level && $this->level & $level ) {
            $this->generateErrorException($level, $message, $file, $line, false);
        }

        return true;
    }
public function handle($level, $message, $file, $line, $context)
    {
        if ( $this->level === 0 ) return true;

        if ( $level & (E_USER_DEPRECATED | E_DEPRECATED) ) {
            if (self::$logger !== null) {
                if ( version_compare(PHP_VERSION, '5.4', '<') ) {
                    $stack = array_slice(debug_backtrace(false), 0, 10);
                } else {
                    $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
                }

                self::$logger->warning($message, array(
                    'type' => self::TYPE_DEPRECATION,
                    'stack' => $stack
                ));
            }

            return true;
        }

        if ( error_reporting() & $level && $this->level & $level ) {
            $this->generateErrorException($level, $message, $file, $line, false);
        }

        return true;
    }
public function handle ( $ level , $ message , $ file , $ line , $ context ) { if ( $ this -> level === 0 ) return true ; if ( $ level & ( E_USER_DEPRECATED | E_DEPRECATED ) ) { if ( self :: $ logger !== null ) { if ( version_compare ( PHP_VERSION , '5.4' , '<' ) ) { $ stack = array_slice ( debug_backtrace ( false ) , 0 , 10 ) ; } else { $ stack = debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS , 10 ) ; } self :: $ logger -> warning ( $ message , array ( 'type' => self :: TYPE_DEPRECATION , 'stack' => $ stack ) ) ; } return true ; } if ( error_reporting ( ) & $ level && $ this -> level & $ level ) { $ this -> generateErrorException ( $ level , $ message , $ file , $ line , false ) ; } return true ; }
This method will be used by set_error_handler

@throws \ErrorException When error_reporting returns error
This method will be used by set_error_handler