db\BaseActiveRecord canSetProperty()

canSetProperty() public method

Returns a value indicating whether a property can be set.

A property can be written if:

  • the class has a setter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);
  • an attached behavior has a writable property of the given name (when $checkBehaviors is true).
public boolean canSetProperty ( $name, $checkVars = true, $checkBehaviors = true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

$checkBehaviors boolean

Whether to treat behaviors' properties as properties of this component

return boolean

Whether the property can be written

doc_Yii
2016-10-30 16:56:38
Comments
Leave a Comment

Please login to continue.