PDO4You\PDO4You::fireAlert PHP Метод

fireAlert() публичный статический Метод

Triggers a warning via email to the system administrator
public static fireAlert ( string $text, object $error ) : void
$text string Error Message
$error object Object of diagnostic of the errors
Результат void
    public static function fireAlert($text, $error)
    {
        $head = 'MIME-Version: 1.1' . PHP_EOL;
        $head .= 'Content-type: text/html; charset=utf-8' . PHP_EOL;
        $head .= 'From: Automatic Alert <[email protected]>' . PHP_EOL;
        $head .= 'Return-Path: Automatic Alert <[email protected]>' . PHP_EOL;
        $body = 'Diagnostic alert:<br /><br /><b>' . $error->getMessage() . '</b><br />' . $error->getFile() . ' : ' . $error->getLine();
        if (static::PDO4YOU_FIREALERT) {
            @mail(static::PDO4YOU_WEBMASTER, $text, $body, $head);
        }
    }