FOF30\Model\Model::setState PHP 메소드

setState() 공개 메소드

Method to set model state variables
public setState ( string $property, mixed $value = null ) : mixed
$property string The name of the property.
$value mixed The value of the property to set or null.
리턴 mixed The previous value of the property or null if not set.
    public function setState($property, $value = null)
    {
        if (is_null($this->state)) {
            $this->state = new \stdClass();
        }
        return $this->state->{$property} = $value;
    }