/**
  * @param array $params
  * @throws \BadMethodCallException
  */
 public function __construct(array $params)
 {
     if (!array_key_exists('controller', $params)) {
         throw new \BadMethodCallException('Bad params');
     }
     parent::__construct($params);
 }
예제 #2
0
 /**
  * @param array $params
  * @throws \BadMethodCallException
  */
 public function __construct(array $params)
 {
     if (!isset($params['controller'], $params['action'])) {
         throw new \BadMethodCallException('Bad params');
     }
     parent::__construct($params);
 }
예제 #3
0
 /**
  * @param array $params
  * @throws \BadMethodCallException
  */
 public function __construct(array $params)
 {
     if (!array_key_exists('callable', $params)) {
         throw new \BadMethodCallException('Bad params');
     }
     if (!is_callable($params['callable'])) {
         throw new \BadMethodCallException('It is not callable');
     }
     parent::__construct($params);
     $this->callable = $params['callable'];
 }