1 | <?php |
||
33 | class Prompt |
||
34 | { |
||
35 | /** |
||
36 | * Path to template |
||
37 | * |
||
38 | * @var string |
||
39 | * |
||
40 | * @access protected |
||
41 | */ |
||
42 | protected $template; |
||
43 | |||
44 | /** |
||
45 | * Status code |
||
46 | * |
||
47 | * @var int |
||
48 | * |
||
49 | * @access protected |
||
50 | */ |
||
51 | protected $status = 403; |
||
52 | |||
53 | /** |
||
54 | * Create a prompt responder |
||
55 | * |
||
56 | * @param string $template path to html template |
||
57 | * @param int $status status code to return |
||
58 | * |
||
59 | * @access public |
||
60 | */ |
||
61 | 1 | public function __construct($template = null, $status = 403) |
|
66 | |||
67 | /** |
||
68 | * Respond with prompt |
||
69 | * |
||
70 | * @param Response $response PSR7 Response |
||
71 | * |
||
72 | * @return Response |
||
73 | * |
||
74 | * @access public |
||
75 | */ |
||
76 | 1 | public function respond(Response $response) |
|
83 | |||
84 | /** |
||
85 | * Get rendered response body |
||
86 | * |
||
87 | * @return string |
||
88 | * |
||
89 | * @access protected |
||
90 | */ |
||
91 | 1 | protected function getBody() |
|
95 | } |
||
96 |