1 | <?php |
||
11 | class Controller extends Application |
||
12 | { |
||
13 | protected $blade; |
||
14 | |||
15 | public $framework , $request , $response , $params; |
||
|
|||
16 | |||
17 | /** |
||
18 | * Controller constructor. |
||
19 | */ |
||
20 | public function __construct() |
||
28 | |||
29 | /** |
||
30 | * @return View |
||
31 | */ |
||
32 | public function _404() |
||
36 | |||
37 | /** |
||
38 | * @param $view |
||
39 | * @param null $params |
||
40 | * |
||
41 | * @return View |
||
42 | */ |
||
43 | public function view($view, $params = null) |
||
50 | |||
51 | /** |
||
52 | * Determine if the uploaded data contains a file. |
||
53 | * |
||
54 | * @param string $key |
||
55 | * @param null $default |
||
56 | * |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function getFile($key = null, $default = null) |
||
63 | |||
64 | /** |
||
65 | * Determine if the uploaded data contains a file. |
||
66 | * |
||
67 | * @param string $key |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function hasFile($key) |
||
79 | |||
80 | /** |
||
81 | * Checks if the request method is of specified type. |
||
82 | * |
||
83 | * @param string $method Uppercase request method (GET, POST etc). |
||
84 | * |
||
85 | * @return bool |
||
86 | */ |
||
87 | public function isMethod($method) |
||
91 | |||
92 | /** |
||
93 | * Get the request method. |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | public function method() |
||
101 | |||
102 | /** |
||
103 | * Retrieve an input item from the request. |
||
104 | * |
||
105 | * @param string $key |
||
106 | * @param string|array|null $default |
||
107 | * |
||
108 | * @return string|array |
||
109 | */ |
||
110 | public function input($key = null, $default = null) |
||
114 | |||
115 | /** |
||
116 | * Determine if the request contains a given input item key. |
||
117 | * |
||
118 | * @param $string |
||
119 | * |
||
120 | * @return bool |
||
121 | * |
||
122 | * @internal param array|string $key |
||
123 | */ |
||
124 | public function exists($string) |
||
128 | |||
129 | /** |
||
130 | * Get all of the input and files for the request. |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | public function all() |
||
138 | |||
139 | /** |
||
140 | * Get the JSON payload for the request. |
||
141 | * |
||
142 | * @param string $key |
||
143 | * @param mixed $default |
||
144 | * |
||
145 | * @return mixed |
||
146 | */ |
||
147 | public function json($key = null, $default = null) |
||
151 | |||
152 | /** |
||
153 | * Determine if the request is the result of an AJAX call. |
||
154 | * |
||
155 | * @return bool |
||
156 | */ |
||
157 | public function ajax() |
||
161 | } |
||
162 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.