當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CApplicationComponent::__call方法代碼示例

本文整理匯總了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);
 }
開發者ID:metalguardian,項目名稱:yii-file-processor,代碼行數:7,代碼來源:MImageHandler.php

示例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);
 }
開發者ID:newga,項目名稱:newga,代碼行數:7,代碼來源:MailgunYii.php

示例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);
     }
 }
開發者ID:d4rkstar,項目名稱:yii-daemon,代碼行數:16,代碼來源:SystemDaemon.php

示例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);
     }
 }
開發者ID:hansenmakangiras,項目名稱:yiiframework-cms,代碼行數:15,代碼來源:CFormatter.php

示例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);
     }
 }
開發者ID:pavelmics,項目名稱:YiiTactician,代碼行數:14,代碼來源:YiiTacticianCommandBus.php

示例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);
 }
開發者ID:mafiu,項目名稱:listapp,代碼行數:16,代碼來源:EGeocoder.php

示例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;
         }
     }
 }
開發者ID:niranjan2m,項目名稱:Voyanga,代碼行數:12,代碼來源:PhpMorphyComponent.php

示例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);
 }
開發者ID:Kuner,項目名稱:xunsearch,代碼行數:24,代碼來源:EXunSearch.php

示例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);
 }
開發者ID:yiicod,項目名稱:mongoyii,代碼行數:13,代碼來源:EMongoClient.php

示例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;
 }
開發者ID:zwq,項目名稱:unpei,代碼行數:20,代碼來源:DGSphinxSearch.php

示例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);
 }
開發者ID:xbb123,項目名稱:yiiextension,代碼行數:15,代碼來源:EasyUpyun.php

示例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);
     }
 }
開發者ID:jasonhai,項目名稱:yii-nfy,代碼行數:15,代碼來源:NfyRedisConnection.php


注:本文中的CApplicationComponent::__call方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。