本文整理汇总了PHP中CApplicationComponent::__call方法的典型用法代码示例。如果您正苦于以下问题:PHP CApplicationComponent::__call方法的具体用法?PHP CApplicationComponent::__call怎么用?PHP CApplicationComponent::__call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CApplicationComponent
的用法示例。
在下文中一共展示了CApplicationComponent::__call方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __call
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);
}
示例2: __call
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);
}
示例3: __call
/**
* 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);
}
}
示例4: __call
/**
* 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);
}
}
示例5: __call
/**
* @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);
}
}
示例6: __call
/**
* @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);
}
示例7: __call
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;
}
}
}
示例8: __call
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);
}
示例9: __call
/**
* 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);
}
示例10: __call
/**
* @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;
}
示例11: __call
/**
* @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);
}
示例12: __call
/**
*
* @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);
}
}