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


PHP Component::__isset方法代碼示例

本文整理匯總了PHP中yii\base\Component::__isset方法的典型用法代碼示例。如果您正苦於以下問題:PHP Component::__isset方法的具體用法?PHP Component::__isset怎麽用?PHP Component::__isset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii\base\Component的用法示例。


在下文中一共展示了Component::__isset方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __isset

 /**
  * @inheritdoc
  */
 public function __isset($name)
 {
     if (property_exists($this->obj, $name)) {
         return $this->obj->{$name} !== null;
     }
     return parent::__isset($name);
 }
開發者ID:omgdef,項目名稱:yii2-unisender,代碼行數:10,代碼來源:UniSender.php

示例2: __isset

 public function __isset($name)
 {
     if ($name == 'jsVar') {
         return isset($this->_jsVar);
     }
     return parent::__isset($name);
 }
開發者ID:beastbytes,項目名稱:yii2-leaflet,代碼行數:7,代碼來源:Base.php

示例3: __isset

 /**
  * Checks if a property value is null.
  * This method overrides the parent implementation by checking if the named component is loaded.
  * @param string $name the property name or the event name
  * @return boolean whether the property value is null
  */
 public function __isset($name)
 {
     if ($this->has($name, true)) {
         return true;
     } else {
         return parent::__isset($name);
     }
 }
開發者ID:sanggabee,項目名稱:hellomedia-yii-basic,代碼行數:14,代碼來源:ServiceLocator.php

示例4: __isset

 public function __isset($name)
 {
     if (isset($this->_api->{$name})) {
         return true;
     } else {
         return parent::__isset($name);
     }
 }
開發者ID:heartshare,項目名稱:yii2-uploadcare,代碼行數:8,代碼來源:Api.php

示例5: __isset

 /**
  * @param string $name
  * @return bool|mixed
  * @throws \yii\base\UnknownPropertyException
  */
 public function __isset($name)
 {
     if (isset($this->objects[$name])) {
         return true;
     }
     return parent::__isset($name);
 }
開發者ID:larryli,項目名稱:ipv4-yii2,代碼行數:12,代碼來源:IPv4.php

示例6: __isset

 /**
  * Checks if a property value is null.
  * This method overrides the parent implementation by checking
  * if the named component is loaded.
  * @param string $name the property name or the event name
  * @return boolean whether the property value is null
  */
 public function __isset($name)
 {
     if ($this->hasComponent($name)) {
         return $this->getComponent($name) !== null;
     } else {
         return parent::__isset($name);
     }
 }
開發者ID:davidpersson,項目名稱:FrameworkBenchmarks,代碼行數:15,代碼來源:Module.php

示例7: __isset

 /**
  * Checks if a property value is null.
  * Do not call this method. This is a PHP magic method that we override
  * to allow using isset() to detect if a component property is set or not.
  * @param string $name the property name
  * @return boolean
  */
 public function __isset($name)
 {
     $getter = 'get' . $name;
     if (property_exists($this->getClient(), $name)) {
         return true;
     } elseif (method_exists($this->getClient(), $getter)) {
         return true;
     }
     return parent::__isset($name);
 }
開發者ID:yii2ext,項目名稱:redis,代碼行數:17,代碼來源:Connection.php


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