Closed hardlick closed 9 years ago
Hi,
you should register the plugin manager as soon as possible:
$profiler = new \Fabfuel\Prophiler\Profiler();
$di->set('profiler', $profiler, true);
$pluginManager = new \Fabfuel\Prophiler\Plugin\Manager\Phalcon($profiler);
$pluginManager->register();
It's also important to inject the EventsManager manually to your dispatcher, view and db services, as they don't report to the events manager by default. When you set up e.g. your dispatcher service, please do:
$dispatcher->setEventsManager($di->get('eventsManager'));
Best Fabian
Hi @fabfuel , thanks for your answers, i changed:
$di->setShared('profiler', $profiler);
for
$di->set('profiler', $profiler, true);
but i dont know where put:
$dispatcher->setEventsManager($di->get('eventsManager'));
Help please
who is $dispatcher ?, sorry but iam new on phalcon...... :(
help @fabfuel :(
Here you find all the infos about the Phalcon dispatcher: http://docs.phalconphp.com/en/latest/reference/dispatching.html
In you services.php (or what ever place you define your services) do:
$di->set('dispatcher', function() use ($di) {
$dispatcher = new \Phalcon\Mvc\Dispatcher();
$dispatcher->setEventsManager($di->get('eventsManager'));
return $dispatcher;
}, true);
thanks a lot", this works!
Hi, i cant view nothing on timeline :( i put in my index.php:
$profiler = new \Fabfuel\Prophiler\Profiler();
and the end of file: after: echo $application->handle()->getContent();
i put:
too:
i dont know where put:
at the end of my index.php too?
Help!, what I'm missing?