Esempio n. 1
0
 public function provides(LocatorInterface $locator)
 {
     $locator->set('Slash\\Router', function () {
         return new Router();
     });
     $locator->set('Slash\\ClosureDispatcher', function () {
         return new ClosureDispatcher();
     });
     $locator->set('Slash\\Event\\Dispatcher\\Impl\\EventDispatcher', function () {
         $dispatcher = new EventDispatcher();
         $dispatcher->addSubscriber(new RouterListener());
         return $dispatcher;
     });
 }
Esempio n. 2
0
 public function provides(LocatorInterface $locator)
 {
     $locator->set('renderer', function () {
         return $this->renderer;
     });
 }