I'm using multi modules structure and I can't register my external classes. Theses classes are located in
Project/common/ext-lib/. So I put in my loader.php this :
$loader = new \Phalcon\Loader(); /** * We're a registering a set of directories taken from the configuration file */ $loader->registerDirs( array( $config->application->controllersDir, $config->application->pluginsDir, $config->application->libraryDir, $config->application->modelsDir, $config->application->externalLib ) ); $loader->registerClasses( array( "Pdf" => "../../common/ext-libs/Pdf.php", "Mail" => "../../common/ext-libs/Mail.php", "Tools" => "../../common/ext-libs/Tools.php", "EDpdf" => "../../common/ext-libs/EDpdf.php" ) ); $loader->register();
And this loader.php is called in the bootstrap file.
But I have an error when I call, for example, Tools.php class by calling
$tools = new Tools() and I don't know how I can fix that. This works well in my single application but it doesn't work in my multi module application.
PHP Fatal error: Class 'Apps\\Frontend\\Controllers\\Tools' not found