/**
  * @param \Spekkoek\ControllerFactory $factory A controller factory instance.
  */
 public function __construct($factory = null)
 {
     // Compatibility with DispatcherFilters.
     foreach (DispatcherFactory::filters() as $filter) {
         $this->addFilter($filter);
     }
     $this->factory = $factory ?: new ControllerFactory();
 }
Exemple #2
0
 /**
  * Get the ActionDispatcher.
  *
  * @return \Cake\Http\ActionDispatcher
  */
 protected function getDispatcher()
 {
     return new ActionDispatcher(null, null, DispatcherFactory::filters());
 }