src/Rio/AbstractEntity.php
protected function set($name, $value)
    {
        if ($this->modified === null && $this->uid !== null) {
            $this->load();
        }

        $value = $this->validate($name, $value);

        if ($this->properties[$name]['value'] !== $value) {
            $this->properties[$name]['value'] = $value;
            $this->modified = true;
        }

        return $this;
    }
protected function set($name, $value)
    {
        if ($this->modified === null && $this->uid !== null) {
            $this->load();
        }

        $value = $this->validate($name, $value);

        if ($this->properties[$name]['value'] !== $value) {
            $this->properties[$name]['value'] = $value;
            $this->modified = true;
        }

        return $this;
    }
protected function set ( $ name , $ value ) { if ( $ this -> modified === null && $ this -> uid !== null ) { $ this -> load ( ) ; } $ value = $ this -> validate ( $ name , $ value ) ; if ( $ this -> properties [ $ name ] [ 'value' ] !== $ value ) { $ this -> properties [ $ name ] [ 'value' ] = $ value ; $ this -> modified = true ; } return $ this ; }
Validate and set property value

@param string $name
@param mixed $value
@return self
@throws \Rio\Exception
Validate and set property value