Hello! I'm having a problem (i hope i picked the right category) when i'm trying to use namespaces in my app. I have created a very basic app and i reproduce the issue there. I am new in phalcon and i'm working with 2.0.6.
This works :
(loader.php)
<?php
$loader = new \Phalcon\Loader();
$loader->registerDirs(array(APP_PATH . $config->application->controllersDir));
//$loader->registerNamespaces(array('Test\Controllers' => APP_PATH . $config->application->controllersDir));
$loader->register();
(IndexController.php)
<?php
//namespace Test\Controllers;
class IndexController extends \Phalcon\Mvc\Model {
public function indexAction() {
}
}
And this (what i'm trying to do) not :
(loader.php)
<?php
$loader = new \Phalcon\Loader();
//$loader->registerDirs(array(APP_PATH . $config->application->controllersDir));
$loader->registerNamespaces(array('Test\Controllers' => APP_PATH . $config->application->controllersDir));
$loader->register();
(IndexController.php)
<?php
namespace Test\Controllers;
class IndexController extends \Phalcon\Mvc\Model {
public function indexAction() {
}
}
Any ideas?