public function __call($name, $parameters) { if (\method_exists($this->_imageHandler, $name)) { return \call_user_func_array(array($this->_imageHandler, $name), $parameters); } return parent::__call($name, $parameters); }
public function __call($name, $parameters) { if (method_exists($this->_api, $name)) { return call_user_func_array(array($this->_api, $name), $parameters); } return parent::__call($name, $parameters); }
/** * Any requests to set or get attributes or call methods on this class that * are not found are redirected to the {@link System_Daemon} object. * * @param string $name the method name * @param array $parameters * @return mixed */ public function __call($name, $parameters) { if (method_exists('System_Daemon', $name)) { return call_user_func_array(array('System_Daemon', $name), $parameters); } else { return parent::__call($name, $parameters); } }
/** * Calls the format method when its shortcut is invoked. * This is a PHP magic method that we override to implement the shortcut format methods. * @param string the method name * @param array method parameters * @return mixed the method return value */ public function __call($name, $parameters) { if (method_exists($this, 'format' . $name)) { return call_user_func_array(array($this, 'format' . $name), $parameters); } else { return parent::__call($name, $parameters); } }
/** * @inheritdoc */ public function __call($name, $parameters) { $callable = [$this->_commandBus, $name]; if (is_callable($callable)) { return call_user_func_array($callable, $parameters); } else { // if $name is not function of CommandBus, // just use regular Yii methods to handle __call return parent::__call($name, $parameters); } }
/** * @param string $name * @param array $params * @return mixed */ public function __call($name, $params) { // just to make sure ;-) if (!$this->getIsInitialized()) { $this->init(); } if (method_exists($this->_geocoder, $name)) { return call_user_func_array(array($this->_geocoder, $name), $params); } return parent::__call($name, $params); }
public function __call($name, $params) { try { return parent::__call($name, $params); } catch (CException $e) { if (method_exists($this->morphy, $name)) { return call_user_func_array(array($this->morphy, $name), $params); } else { throw $e; } } }
public function __call($name, $parameters) { // check methods of xs if ($this->_xs !== null && method_exists($this->_xs, $name)) { return call_user_func_array(array($this->_xs, $name), $parameters); } // check methods of index object if ($this->_xs !== null && method_exists('XSIndex', $name)) { $ret = call_user_func_array(array($this->_xs->index, $name), $parameters); if ($ret === $this->_xs->index) { return $this; } return $ret; } // check methods of search object if ($this->_xs !== null && method_exists('XSSearch', $name)) { $ret = call_user_func_array(array($this->_xs->search, $name), $parameters); if ($ret === $this->_xs->search) { return $this; } return $ret; } return parent::__call($name, $parameters); }
/** * Will call a function on the database or error out stating that the function does not exist * @param string $name * @param array $parameters * @return mixed */ public function __call($name, $parameters = []) { if (!method_exists($this->getDB(), $name)) { return parent::__call($name, $parameters); } return call_user_func_array([$this->getDB(), $name], $parameters); }
/** * @brief magic for wrap SphinxClient functions * @param string $name * @param array $parameters * @return DGSphinxSearch */ public function __call($name, $parameters) { $res = null; if (method_exists($this->client, $name)) { $res = call_user_func_array(array($this->client, $name), $parameters); } else { $res = parent::__call($name, $parameters); } // if setter or resetter then return chain if (strtolower(substr($name, 0, 3)) === 'set' || strtolower(substr($name, 0, 5)) === 'reset') { $res = $this; } return $res; }
/** * @param string $name * @param array $paramaters * * @return mixed */ public function __call($name, $paramaters) { $domain = array_shift($paramaters); $upyun = $this->getBucketInfo($domain); if (method_exists($upyun, $name)) { return call_user_func_array(array($upyun, $name), $paramaters); } return parent::__call($name, $paramaters); }
/** * * @param string $name * @param array $params * @return mixed */ public function __call($name, $params) { $redisCommand = strtoupper(self::camel2words($name, false)); if (in_array($redisCommand, $this->redisCommands)) { return $this->executeCommand($name, $params); } else { return parent::__call($name, $params); } }