Hi guys,
I need a confirmation if what i'm doing isn't redundant.
public/index
$loader = new \Phalcon\Loader();
$loader->registerDirs(array(
'../app/controllers/',
'../app/models/'
))->register();
/**
* Register a user component
*/
$di->set('client', function(){
return new ClientController();
});
app/view/client/index.php calling html function
<?php echo $this->getContent(); ?>
<?php echo $this->client->doHtml(); ?>
This is working, but I really need to register the class? The registerDirs method doesn't do this automatically? Perhaps is there any way to do this happen automatically?