1 | <?php |
||
8 | trait FormzControllerTrait |
||
9 | { |
||
10 | /** |
||
11 | * @var FormzControllerContext |
||
12 | */ |
||
13 | protected $formzControllerContext; |
||
14 | |||
15 | /** |
||
16 | * This function will dispatch the request to the form controller, which |
||
17 | * will process the request depending on Formz configuration. |
||
18 | * |
||
19 | * @param RequestInterface $request |
||
20 | * @param ResponseInterface $response |
||
21 | */ |
||
22 | public function processRequest(RequestInterface $request, ResponseInterface $response) |
||
42 | |||
43 | /** |
||
44 | * @param FormzControllerContext $formzControllerContext |
||
45 | */ |
||
46 | public function injectFormzControllerContext(FormzControllerContext $formzControllerContext) |
||
50 | } |
||
51 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: