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


PHP Behavior::canGetProperty方法代碼示例

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


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

示例1: canGetProperty

 /**
  * Indicates whether a property can be read.
  * @param string $name the property name
  * @param boolean $checkVars whether to treat member variables as properties
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (!in_array($name, $this->attrs)) {
         return parent::canGetProperty($name, $checkVars);
     }
     return true;
 }
開發者ID:dlds,項目名稱:yii2-rels,代碼行數:12,代碼來源:Behavior.php

示例2: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
開發者ID:Mirocow,項目名稱:yii2-flag-behavior,代碼行數:10,代碼來源:FlagBehavior.php

示例3: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (in_array($name, [$this->titleAttribute, $this->keywordsAttribute, $this->descriptionAttribute])) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
開發者ID:romi45,項目名稱:yii2-seo-behavior,代碼行數:10,代碼來源:SeoBehavior.php

示例4: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if ($name === $this->attribute) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
開發者ID:2amigos,項目名稱:yii2-taggable-behavior,代碼行數:10,代碼來源:Taggable.php

示例5: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     } else {
         return $this->hasAttribute($name);
     }
 }
開發者ID:manyoubaby123,項目名稱:imshop,代碼行數:11,代碼來源:EavBehavior.php

示例6: canGetProperty

 public function canGetProperty($name, $checkVars = true)
 {
     if (in_array($name, $this->mediasAttributes)) {
         return true;
     } else {
         return parent::canGetProperty($name, $checkVars);
     }
 }
開發者ID:kleitz,項目名稱:golfleague,代碼行數:8,代碼來源:MediaBehavior.php

示例7: canGetProperty

 public function canGetProperty($name, $checkVars = true)
 {
     if (preg_match('/^(.+)(_image)$/', $name, $m) && isset($m[1]) && isset($this->imageFields[$m[1]])) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
     // TODO: Change the autogenerated stub
 }
開發者ID:dkhru,項目名稱:yii2-image-store,代碼行數:8,代碼來源:ImageBehavior.php

示例8: canGetProperty

 public function canGetProperty($name, $checkVars = true)
 {
     if ($this->fileInputName == $name) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
     // TODO: Change the autogenerated stub
 }
開發者ID:zabachok,項目名稱:yii2-hydra,代碼行數:8,代碼來源:FileInput.php

示例9: canGetProperty

 /**
  * Expose [[$attributes]] readable
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return isset($this->attributes[$name]) || parent::canGetProperty($name, $checkVars);
 }
開發者ID:iutbay,項目名稱:yii2-behaviors,代碼行數:8,代碼來源:ConverterBehavior.php

示例10: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->virtualAttributesNames()) ? true : parent::canGetProperty($name, $checkVars);
 }
開發者ID:cakebake,項目名稱:yii2-scalable-behavior,代碼行數:7,代碼來源:ScalableBehavior.php

示例11: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return $this->transformedPropertyExists($name) || parent::canGetProperty($name, $checkVars);
 }
開發者ID:tsyrya,項目名稱:mybriop,代碼行數:7,代碼來源:TransformationBehavior.php

示例12: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     }
     return $name === $this->relationReferenceAttribute;
 }
開發者ID:yii2tech,項目名稱:ar-linkmany,代碼行數:10,代碼來源:LinkManyBehavior.php

示例13: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->getTranslationModelAttributes()) || parent::canGetProperty($name, $checkVars);
 }
開發者ID:uniqby,項目名稱:yii2-ar-translatable,代碼行數:7,代碼來源:Translatable.php

示例14: canGetProperty

 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     $this->initProperties();
     return isset($this->_properties[$name]) || array_key_exists($name, $this->_properties) || parent::canGetProperty($name, $checkVars);
 }
開發者ID:sangkilsoft,項目名稱:sangkilbiz-3,代碼行數:8,代碼來源:PropertyBehavior.php

示例15: canGetProperty

 public function canGetProperty($name, $checkVars = true)
 {
     if ($this->hasStoreRelation($name)) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
開發者ID:RangelReale,項目名稱:yii2-storerelation,代碼行數:7,代碼來源:StoreRelationBehavior.php


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