1 | <?php |
||
3 | class SiteController extends AppController { |
||
4 | |||
5 | public function beforeFilter(){ |
||
10 | |||
11 | public function home() { |
||
14 | |||
15 | public function contato() { |
||
18 | |||
19 | public function paginas() { |
||
22 | |||
23 | public function galeria() { |
||
26 | |||
27 | public function setLayout($playout) { |
||
30 | |||
31 | public function getLayout() { |
||
34 | |||
35 | } |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: