__construct() public method

public __construct ( $resource, array $config )
$resource
$config array
Example #1
0
 function __construct($resource, array $config)
 {
     $controller = explode('::', $config['_controller']);
     $this->controller = $controller[0];
     if (!isset($controller[1])) {
         throw new Exception('Не определён экшн');
     }
     $this->bundle = $config['bundle'];
     $this->action = $controller[1];
     $this->controllerClass = $config['namespace'] . $this->controller;
     $config['_controller'] = $config['namespace'] . $config['_controller'];
     parent::__construct($resource, $config);
 }