Can't make the switch from a single Module app to a Multi Module app

I setup an AWS EC2 instance, loaded up CentOS, PHP and Phalcon. Built my first single module test app using the docs, and all was well.

Then I thought I'd get all fancy and build a multi-module app, with the intent of putting in an API.

I've got a folder structure like this:


app0 and app1 are basically direct copies of the working single module app.

I have my index.php in /my_app It's a copy and edit of the one in the phalcon docs.

Everything seems ok until it fires echo $application->handle()->getContent(); Nothing happens. I echo some stuff right before it, and right after it, but the after echo never happens.

I didn't want to spam the post with code, but I can supply that if need be.



edited Mar '16

Take a look at my Webird project. I spent a lot of time reviewing all of the project skeletons out there to merge their advantages together. My system is fairly complicated but it solves a whole lot of issues that will come up.

It means you have error somewhere. Check a logs :)

edited Mar '16

I got this in the log, but now I can't get it again: Declaration of Multiple\App0\Module::registerAutoloaders() must be compatible with Phalcon\Mvc\ModuleDefinitionInterface::registerAutoloaders(Phalcon\DiInterface $dependencyInjector = NULL) in Module.php on line 12

Nothing else is showing up. I set error reporting(E ALL); and I'm not getting anything.

So maybe fix it first ?


I think I don't know enough to make it work at all. I reverted back to the single app which was working before and I'm going forward from there. Thank you for all the answers!


Hey @driscojs perhaps you should start out with this multiple module skeleton. You can learn by running the different skeletons and then merging what you think are the best features together into a single project.

edited Mar '16

I've just taken a look at the docs and I've spotted an error. In your module class, replace this:

public function registerAutoloaders()


public function registerAutoloaders(\Phalcon\DiInterface $di = null)

This should fix your problem. I'll fix the documentation tomorrow.