canSetProperty() public method

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).
See also: canGetProperty()
public canSetProperty ( string $name, boolean $checkVars = true, boolean $checkBehaviors = true ) : boolean
$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
Example #1
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     if (property_exists($this->obj, $name)) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }