public function handlePHPErrors(
        $errorNumber,
        $errorString,
        $errorFile = null,
        $errorLine = null,
        $errorContext = array()
    ) {
        if (error_reporting() !== 0) {
            if ($errorNumber === E_STRICT) {
                foreach ($this->ACCEPTABLE_WARNINGS as $pattern) {
                    if (preg_match($pattern, $errorString) > 0) {
                        return false;
                    }
                }
            }

            switch ($errorNumber) {
                case E_USER_ERROR:
                case E_RECOVERABLE_ERROR:
                    $severity = self::FATAL_LEVEL;
                    break;
                case E_WARNING:
                case E_USER_WARNING:
                    $severity = self::ERROR_LEVEL;
                    break;
                case E_NOTICE:
                case E_USER_NOTICE:
                    $severity = self::WARNING_LEVEL;
                    break;
                case E_DEPRECATED:
                case E_USER_DEPRECATED:
                case E_STRICT:
                    $severity = self::DEBUG_LEVEL;
                    break;
                default:
                    self::d('Unsupported PHP error type: ' . $errorNumber, 'common_Logger');
                    $severity = self::ERROR_LEVEL;
                    break;
            }

            self::singleton()->log(
                $severity,
                sprintf('php error(%s): %s', $errorNumber, $errorString),
                [
                    'PHPERROR',
                    self::CONTEXT_ERROR_FILE => $errorFile,
                    self::CONTEXT_ERROR_LINE => $errorLine,
                    self::CONTEXT_TRACE      => self::addTrace()
                ]
            );
        }

        return false;
    }
public function handlePHPErrors(
        $errorNumber,
        $errorString,
        $errorFile = null,
        $errorLine = null,
        $errorContext = array()
    ) {
        if (error_reporting() !== 0) {
            if ($errorNumber === E_STRICT) {
                foreach ($this->ACCEPTABLE_WARNINGS as $pattern) {
                    if (preg_match($pattern, $errorString) > 0) {
                        return false;
                    }
                }
            }

            switch ($errorNumber) {
                case E_USER_ERROR:
                case E_RECOVERABLE_ERROR:
                    $severity = self::FATAL_LEVEL;
                    break;
                case E_WARNING:
                case E_USER_WARNING:
                    $severity = self::ERROR_LEVEL;
                    break;
                case E_NOTICE:
                case E_USER_NOTICE:
                    $severity = self::WARNING_LEVEL;
                    break;
                case E_DEPRECATED:
                case E_USER_DEPRECATED:
                case E_STRICT:
                    $severity = self::DEBUG_LEVEL;
                    break;
                default:
                    self::d('Unsupported PHP error type: ' . $errorNumber, 'common_Logger');
                    $severity = self::ERROR_LEVEL;
                    break;
            }

            self::singleton()->log(
                $severity,
                sprintf('php error(%s): %s', $errorNumber, $errorString),
                [
                    'PHPERROR',
                    self::CONTEXT_ERROR_FILE => $errorFile,
                    self::CONTEXT_ERROR_LINE => $errorLine,
                    self::CONTEXT_TRACE      => self::addTrace()
                ]
            );
        }

        return false;
    }
public function handlePHPErrors ( $ errorNumber , $ errorString , $ errorFile = null , $ errorLine = null , $ errorContext = array ( ) ) { if ( error_reporting ( ) !== 0 ) { if ( $ errorNumber === E_STRICT ) { foreach ( $ this -> ACCEPTABLE_WARNINGS as $ pattern ) { if ( preg_match ( $ pattern , $ errorString ) > 0 ) { return false ; } } } switch ( $ errorNumber ) { case E_USER_ERROR : case E_RECOVERABLE_ERROR : $ severity = self :: FATAL_LEVEL ; break ; case E_WARNING : case E_USER_WARNING : $ severity = self :: ERROR_LEVEL ; break ; case E_NOTICE : case E_USER_NOTICE : $ severity = self :: WARNING_LEVEL ; break ; case E_DEPRECATED : case E_USER_DEPRECATED : case E_STRICT : $ severity = self :: DEBUG_LEVEL ; break ; default : self :: d ( 'Unsupported PHP error type: ' . $ errorNumber , 'common_Logger' ) ; $ severity = self :: ERROR_LEVEL ; break ; } self :: singleton ( ) -> log ( $ severity , sprintf ( 'php error(%s): %s' , $ errorNumber , $ errorString ) , [ 'PHPERROR' , self :: CONTEXT_ERROR_FILE => $ errorFile , self :: CONTEXT_ERROR_LINE => $ errorLine , self :: CONTEXT_TRACE => self :: addTrace ( ) ] ) ; } return false ; }
A handler for php errors, should never be called manually

@access public
@author Joel Bout, <joel.bout@tudor.lu>

@param  int $errorNumber
@param  string $errorString
@param  string $errorFile
@param  mixed $errorLine
@param  array $errorContext

@return boolean
A handler for php errors should never be called manually