Sub Folders in controllers

Is it possible to have sub-folders in the controllers folder?

Rather than have

controllers/ReportsController.php with actions:

public function fooAction(){ }

public functionbarAction(){ }

Can I use;

controllers/reports/fooController.php controllers/reports/barController.php

I just can't get that to work - maybe because it's not possible. I've used something similar in Code Igniter though.



83.4k

Controllers are loaded from the directories registered in the loader:

<?php

$loader = new \Phalcon\Loader();

$loader->registerDirs(
    array(
        '../app/controllers/'
        '../app/controllers/reports/'
    )
)->register();