Hey!
I have a question regarding namespaces, from all the documentation I can find, you have to expressively define every single namespace and its dir. I want to define the root namespace and then have directories correspond to namespaces, like this:
index.php:
<?php
$loader = new \Phalcon\Loader();
$loader->registerNamespaces(
array(
"Application" => "/"
)
);
$loader->register();
Now, if I create for example the file app/utils/validators/EmailValidator.php
: ...
<?php
namespace Application\Utils\Validators;
class EmailValidator {}
... I want to be able to access this class without having to manually add Application\Utils
and Application\Utils\Validators
in the loader. Do I really have to register everything manually?
Regards, dimhoLt