本文整理匯總了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);
}