I am using Micro and I don't want to instantiate all the controllers at once so I am using this:
$controller = explode('/', $app->request->getUri());
$collection = new Phalcon\Mvc\Micro\Collection();
$collection->setHandler(ucfirst($controller[1]) . 'Controller', true);
$collection->get('/', 'index');
...
$app->mount($collection);
Is there a way to get just the user
from the request URI so I don't have to extract it from a string?
Also, am I doing this the right way?