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


PHP Behavior::canSetProperty方法代碼示例

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


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

示例1: canSetProperty

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

示例2: canSetProperty

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

示例3: canSetProperty

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

示例4: canSetProperty

 public function canSetProperty($name, $checkVars = true)
 {
     $getter = 'get' . $name;
     if (method_exists($this->owner, $getter) && $this->owner->{$getter}() instanceof ActiveQuery) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
開發者ID:Liv1020,項目名稱:cms,代碼行數:8,代碼來源:RelationalBehavior.php

示例5: canSetProperty

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

示例6: canSetProperty

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

示例7: canSetProperty

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

示例8: canSetProperty

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

示例9: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->hasAttributeValue($name)) {
         return true;
     } else {
         return parent::canSetProperty($name, $checkVars);
     }
 }
開發者ID:maddoger,項目名稱:yii2-datetimepicker,代碼行數:11,代碼來源:DateTimeBehavior.php

示例10: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     if ($name == $this->relationParameter && $this->via !== null) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }
開發者ID:alesar-code,項目名稱:yii2-base,代碼行數:10,代碼來源:RelationBehavior.php

示例11: canSetProperty

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

示例12: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return stripos($name, 'client') === 0 && strcasecmp($name, 'clientId') != 0 || parent::canSetProperty($name, $checkVars);
 }
開發者ID:mdmsoft,項目名稱:yii2-client-tools,代碼行數:7,代碼來源:ClientBehavior.php

示例13: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     if ($this->owner === null) {
         return false;
     }
     return $name === $this->fileAttribute;
 }
開發者ID:yii2tech,項目名稱:ar-file,代碼行數:13,代碼來源:FileBehavior.php

示例14: canSetProperty

 /**
  * @param string $name
  * @param bool $checkVars
  * @return bool
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $name === $this->virtAttr || parent::canSetProperty($name, $checkVars);
 }
開發者ID:ptheofan,項目名稱:yii2-statemachine,代碼行數:9,代碼來源:StateMachineBehavior.php

示例15: canSetProperty

 public function canSetProperty($name, $checkVars = true)
 {
     $rels = array_flip($this->directoryAttributes);
     return isset($rels[$name]) || parent::canSetProperty($name, $checkVars);
 }
開發者ID:tsyrya,項目名稱:mybriop,代碼行數:5,代碼來源:DirectoryBehavior.php


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