Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 25... Línea 25...
25
     * The status code is a 3-digit integer result code of the server's attempt
25
     * The status code is a 3-digit integer result code of the server's attempt
26
     * to understand and satisfy the request.
26
     * to understand and satisfy the request.
27
     *
27
     *
28
     * @return int Status code.
28
     * @return int Status code.
29
     */
29
     */
30
    public function getStatusCode();
30
    public function getStatusCode(): int;
Línea 31... Línea 31...
31
 
31
 
32
    /**
32
    /**
33
     * Return an instance with the specified status code and, optionally, reason phrase.
33
     * Return an instance with the specified status code and, optionally, reason phrase.
34
     *
34
     *
Línea 47... Línea 47...
47
     *     provided status code; if none is provided, implementations MAY
47
     *     provided status code; if none is provided, implementations MAY
48
     *     use the defaults as suggested in the HTTP specification.
48
     *     use the defaults as suggested in the HTTP specification.
49
     * @return static
49
     * @return static
50
     * @throws \InvalidArgumentException For invalid status code arguments.
50
     * @throws \InvalidArgumentException For invalid status code arguments.
51
     */
51
     */
52
    public function withStatus($code, $reasonPhrase = '');
52
    public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface;
Línea 53... Línea 53...
53
 
53
 
54
    /**
54
    /**
55
     * Gets the response reason phrase associated with the status code.
55
     * Gets the response reason phrase associated with the status code.
56
     *
56
     *
Línea 62... Línea 62...
62
     *
62
     *
63
     * @link http://tools.ietf.org/html/rfc7231#section-6
63
     * @link http://tools.ietf.org/html/rfc7231#section-6
64
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
64
     * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
65
     * @return string Reason phrase; must return an empty string if none present.
65
     * @return string Reason phrase; must return an empty string if none present.
66
     */
66
     */
67
    public function getReasonPhrase();
67
    public function getReasonPhrase(): string;
68
}
68
}