Esempio n. 1
0
 /**
  * Overload method access.
  *
  * @param mixed $method
  * @param mixed $args
  *
  * @throws Exception\BadMethodCallException
  *
  * @return mixed
  */
 public function __call($method, $args)
 {
     if ($this->basePath == null && method_exists($this->view, 'plugin')) {
         $this->basePath = $this->view->plugin('basepath')->__invoke();
     }
     $ret = false;
     if (preg_match('/^(?P<action>set|(ap|pre)pend)(?P<type>Bootstrap|FontAwesome)$/', $method, $matches)) {
         $ret = $this->callWithCdn($matches, $args);
     } elseif (preg_match('/^(?P<action>set|(ap|pre)pend)(?P<type>Chosen|ChosenBootstrap)$/', $method, $matches)) {
         $ret = $this->callWithoutCdn($matches, $args);
     }
     return $ret !== false ? $ret : parent::__call($method, $args);
 }