Model::set PHP Method

set() public method

Setter method, allows $model->set('property', 'value') access to data.
public set ( string | array $property, string | null $value = null ) : Model
$property string | array
$value string | null
return Model
    public function set($property, $value = null)
    {
        $this->orm->set($property, $value);
        return $this;
    }

Usage Example

 /**
  * @param Model $model
  **/
 public function addParamsToModel(Model $model)
 {
     if ($this->version == '1.1') {
         $model->set('openid.ns.sreg', self::NAMESPACE_1_1);
     }
     $model->set('openid.sreg.optional', implode(',', $this->params));
 }
All Usage Examples Of Model::set