Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (in_array($name, [$this->titleAttribute, $this->keywordsAttribute, $this->descriptionAttribute])) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if ($name === $this->attribute) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 5
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     } else {
         return $this->hasAttribute($name);
     }
 }
Exemplo n.º 6
0
 public function canGetProperty($name, $checkVars = true)
 {
     if (in_array($name, $this->mediasAttributes)) {
         return true;
     } else {
         return parent::canGetProperty($name, $checkVars);
     }
 }
Exemplo n.º 7
0
 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
 }
Exemplo n.º 8
0
 public function canGetProperty($name, $checkVars = true)
 {
     if ($this->fileInputName == $name) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
     // TODO: Change the autogenerated stub
 }
Exemplo n.º 9
0
 /**
  * Expose [[$attributes]] readable
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return isset($this->attributes[$name]) || parent::canGetProperty($name, $checkVars);
 }
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->virtualAttributesNames()) ? true : parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 11
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return $this->transformedPropertyExists($name) || parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 12
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     }
     return $name === $this->relationReferenceAttribute;
 }
Exemplo n.º 13
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->getTranslationModelAttributes()) || parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 14
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     $this->initProperties();
     return isset($this->_properties[$name]) || array_key_exists($name, $this->_properties) || parent::canGetProperty($name, $checkVars);
 }
 public function canGetProperty($name, $checkVars = true)
 {
     if ($this->hasStoreRelation($name)) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
 /**
  * @param string $name
  * @param bool|true $checkVars
  * @return bool
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return $name === $this->virtAttr || parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 17
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     }
     if (array_key_exists($name, $this->variationAttributeDefaultValueMap)) {
         return true;
     }
     if ($this->owner == null) {
         return false;
     }
     $model = $this->getDefaultVariationModel();
     return is_object($model) && $model->hasAttribute($name);
 }
Exemplo n.º 18
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return stripos($name, 'client') === 0 || parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 19
0
 public function canGetProperty($name, $checkVars = true)
 {
     $rels = array_flip($this->directoryAttributes);
     return isset($rels[$name]) || parent::canGetProperty($name, $checkVars);
 }
 public function canGetProperty($name, $checkVars = true)
 {
     $matches = null;
     if (preg_match('/__(\\w+)_(\\w+)__/', $name, $matches)) {
         $attr = $matches[1];
         $vattr = $matches[2];
         if (isset($this->attributes[$attr])) {
             /** @var Illustration $cfg */
             $cfg = $this->attributes[$attr];
             return $checkVars ? $cfg->hasProperty($vattr) : true;
         }
     }
     return parent::canGetProperty($name, $checkVars);
 }
 public function canGetProperty($name, $checkVars = true)
 {
     if ($this->hasLocalValue($name)) {
         return true;
     } else {
         return parent::canGetProperty($name, $checkVars);
     }
 }
Exemplo n.º 22
0
 /**
  * @param string $name
  * @param bool|true $checkVars
  * @return bool
  */
 public function canGetProperty($name, $checkVars = true)
 {
     $originalName = str_replace($this->filedSuffix, '', $name);
     if (isset($this->fields[$originalName])) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 23
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     }
     if ($this->owner === null) {
         return false;
     }
     return $name === $this->fileAttribute;
 }
Exemplo n.º 24
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if (parent::canGetProperty($name, $checkVars)) {
         return true;
     }
     $model = $this->getRoleRelationModel();
     return $model->hasAttribute($name) || $model->canGetProperty($name, $checkVars);
 }
Exemplo n.º 25
0
 /**
  * @inheritdoc
  * @return bool
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return $this->isAttribute($name) ?: parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 26
0
 public function canGetProperty($name, $checkVars = true)
 {
     return $this->_relation->canGetProperty($name, $checkVars) || parent::canGetProperty($name, $checkVars);
 }
 /**
  * Returns a value indicating whether a property can be read.
  * We return true if it is one of our properties and pass the
  * params on to the parent class otherwise.
  * TODO: Make it honor $checkVars ??
  *
  * @param string $name the property name
  * @param boolean $checkVars whether to treat member variables as properties
  * @return boolean whether the property can be read
  * @see canSetProperty()
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return array_key_exists($name, $this->_fields) ? true : parent::canGetProperty($name, $checkVars);
 }
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     $attribute = $this->attributeFromPropertyUrl($name);
     return $attribute && isset($this->attributes[$attribute]) && is_array($this->attributes[$attribute]) || parent::canGetProperty($name, $checkVars);
 }
 /**
  * Expose [[$translationAttributes]] readable
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->translationAttributes) ? true : parent::canGetProperty($name, $checkVars);
 }
Exemplo n.º 30
0
 /**
  * @inheritdoc
  */
 public function canGetProperty($name, $checkVars = true)
 {
     if ($name == $this->relationName) {
         return true;
     }
     if ($name == $this->relationParameter && $this->via !== null) {
         return true;
     }
     return parent::canGetProperty($name, $checkVars);
 }