Hio,
currently we are building up a CLI app. I prepared a standard bootstrap file and there everything which is need gets loaded.
In this file is a function:
/**
* Initializes the loader
*/
private function _initLoader(){
if(count($this->_namespaces) > 0){
$loader = new Phalcon\Loader();
$loader
->registerNamespaces($this->_namespaces)
->register();
}
}
The content of the $this->_namespaces looks like:
array(
'Path/To/Ns' => 'Path\To\Ns'
);
The task itself looks like:
namespace Path\To\Ns;
class AnyTask extends Phalcon\CLI\Task{
public function mainAction(){
echo "Main action ...";
}
public function createAction(){
echo "Create action ...";
}
}
I receive all the time the following message when I run my app:
php -f path/to/bootstrap.php any
# Output: AnyTask handler class cannot be loaded
Any ideas?