本文整理汇总了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;
}
示例2: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
return true;
}
return parent::canGetProperty($name, $checkVars);
}
示例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);
}
示例4: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
if ($name === $this->attribute) {
return true;
}
return parent::canGetProperty($name, $checkVars);
}
示例5: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
if (parent::canGetProperty($name, $checkVars)) {
return true;
} else {
return $this->hasAttribute($name);
}
}
示例6: canGetProperty
public function canGetProperty($name, $checkVars = true)
{
if (in_array($name, $this->mediasAttributes)) {
return true;
} else {
return parent::canGetProperty($name, $checkVars);
}
}
示例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
}
示例8: canGetProperty
public function canGetProperty($name, $checkVars = true)
{
if ($this->fileInputName == $name) {
return true;
}
return parent::canGetProperty($name, $checkVars);
// TODO: Change the autogenerated stub
}
示例9: canGetProperty
/**
* Expose [[$attributes]] readable
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
return isset($this->attributes[$name]) || parent::canGetProperty($name, $checkVars);
}
示例10: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
return in_array($name, $this->virtualAttributesNames()) ? true : parent::canGetProperty($name, $checkVars);
}
示例11: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
return $this->transformedPropertyExists($name) || parent::canGetProperty($name, $checkVars);
}
示例12: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
if (parent::canGetProperty($name, $checkVars)) {
return true;
}
return $name === $this->relationReferenceAttribute;
}
示例13: canGetProperty
/**
* @inheritdoc
*/
public function canGetProperty($name, $checkVars = true)
{
return in_array($name, $this->getTranslationModelAttributes()) || parent::canGetProperty($name, $checkVars);
}
示例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);
}
示例15: canGetProperty
public function canGetProperty($name, $checkVars = true)
{
if ($this->hasStoreRelation($name)) {
return true;
}
return parent::canGetProperty($name, $checkVars);
}