1 | <?php |
||
14 | class HtmlResponse extends Response |
||
15 | { |
||
16 | /** |
||
17 | * @var HtmlElementInterface |
||
18 | */ |
||
19 | protected $htmlElement; |
||
20 | |||
21 | /** |
||
22 | * @var Stream |
||
23 | */ |
||
24 | protected $stream; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param HtmlElementInterface $htmlElement An HtmlElement to render. |
||
30 | * @param int $status The response status code |
||
31 | * @param array $headers An array of response headers |
||
32 | */ |
||
33 | public function __construct(HtmlElementInterface $htmlElement, $status = 200, $headers = array()) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public static function create(HtmlElementInterface $htmlElement, $status = 200, $headers = array()) |
||
47 | |||
48 | /** |
||
49 | * Sets the HtmlElement to be rendered. |
||
50 | * |
||
51 | * @param HtmlElementInterface $htmlElement |
||
52 | */ |
||
53 | public function setHtmlElement(HtmlElementInterface $htmlElement) |
||
57 | |||
58 | /** |
||
59 | * Returns the HtmlElement to be rendered. |
||
60 | * |
||
61 | * @return \Mouf\Html\HtmlElement\HtmlElementInterface |
||
62 | */ |
||
63 | public function getHtmlElement() |
||
67 | |||
68 | /** |
||
69 | * Gets the body of the message. |
||
70 | * |
||
71 | * @return StreamInterface Returns the body as a stream. |
||
72 | */ |
||
73 | public function getBody() |
||
85 | } |
||
86 |