public static function status($code = null, $trigger = true)
    {
        if (self::$httpCode === null) {
            self::$httpCode = \UtilsStatusCode();
        }

        if ($code === null || self::$httpCode === $code) {
            return self::$httpCode;
        } elseif (headers_sent() || $code < 100 || $code > 599) {
            return false;
        }

        header('X-PHP-Response-Code: ' . $code, true, $code);

        $lastCode = self::$httpCode;
        self::$httpCode = $code;

        if ($trigger) {
            App::trigger('changestatus', array($code, null));
        }

        return $lastCode;
    }