xref: /plugin/davcal/vendor/sabre/http/lib/ResponseInterface.php (revision a1a3b6794e0e143a4a8b51d3185ce2d339be61ab)
1*a1a3b679SAndreas Boehler<?php
2*a1a3b679SAndreas Boehler
3*a1a3b679SAndreas Boehlernamespace Sabre\HTTP;
4*a1a3b679SAndreas Boehler
5*a1a3b679SAndreas Boehler/**
6*a1a3b679SAndreas Boehler * This interface represents a HTTP response.
7*a1a3b679SAndreas Boehler *
8*a1a3b679SAndreas Boehler * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/).
9*a1a3b679SAndreas Boehler * @author Evert Pot (http://evertpot.com/)
10*a1a3b679SAndreas Boehler * @license http://sabre.io/license/ Modified BSD License
11*a1a3b679SAndreas Boehler */
12*a1a3b679SAndreas Boehlerinterface ResponseInterface extends MessageInterface {
13*a1a3b679SAndreas Boehler
14*a1a3b679SAndreas Boehler    /**
15*a1a3b679SAndreas Boehler     * Returns the current HTTP status code.
16*a1a3b679SAndreas Boehler     *
17*a1a3b679SAndreas Boehler     * @return int
18*a1a3b679SAndreas Boehler     */
19*a1a3b679SAndreas Boehler    function getStatus();
20*a1a3b679SAndreas Boehler
21*a1a3b679SAndreas Boehler    /**
22*a1a3b679SAndreas Boehler     * Returns the human-readable status string.
23*a1a3b679SAndreas Boehler     *
24*a1a3b679SAndreas Boehler     * In the case of a 200, this may for example be 'OK'.
25*a1a3b679SAndreas Boehler     *
26*a1a3b679SAndreas Boehler     * @return string
27*a1a3b679SAndreas Boehler     */
28*a1a3b679SAndreas Boehler    function getStatusText();
29*a1a3b679SAndreas Boehler
30*a1a3b679SAndreas Boehler    /**
31*a1a3b679SAndreas Boehler     * Sets the HTTP status code.
32*a1a3b679SAndreas Boehler     *
33*a1a3b679SAndreas Boehler     * This can be either the full HTTP status code with human readable string,
34*a1a3b679SAndreas Boehler     * for example: "403 I can't let you do that, Dave".
35*a1a3b679SAndreas Boehler     *
36*a1a3b679SAndreas Boehler     * Or just the code, in which case the appropriate default message will be
37*a1a3b679SAndreas Boehler     * added.
38*a1a3b679SAndreas Boehler     *
39*a1a3b679SAndreas Boehler     * @param string|int $status
40*a1a3b679SAndreas Boehler     * @throws \InvalidArgumentExeption
41*a1a3b679SAndreas Boehler     * @return void
42*a1a3b679SAndreas Boehler     */
43*a1a3b679SAndreas Boehler    function setStatus($status);
44*a1a3b679SAndreas Boehler
45*a1a3b679SAndreas Boehler}
46