instantiateController() protected method

Returns an instantiated controller.
protected instantiateController ( string $class ) : object
$class string A class name
return object
コード例 #1
0
ファイル: ControllerResolver.php プロジェクト: Dren-x/mobit
 /**
  * {@inheritdoc}
  */
 protected function instantiateController($class)
 {
     $controller = parent::instantiateController($class);
     if ($controller instanceof ContainerAwareInterface) {
         $controller->setContainer($this->container);
     }
     return $controller;
 }
コード例 #2
0
 /**
  * @param string $class
  *
  * @return object
  */
 protected function instantiateController($class)
 {
     $controller = parent::instantiateController($class);
     if ($controller instanceof ServiceLocatorAwareInterface) {
         $controller->setServiceLocator($this->serviceManager);
     }
     return $controller;
 }