Pimcore\Model\AbstractModel::setValue PHP Method

setValue() public method

public setValue ( $key, $value )
$key
$value
    public function setValue($key, $value)
    {
        $method = "set" . $key;
        if (method_exists($this, $method)) {
            $this->{$method}($value);
        } elseif (method_exists($this, "set" . preg_replace("/^o_/", "", $key))) {
            // compatibility mode for objects (they do not have any set_oXyz() methods anymore)
            $this->{$method}($value);
        }
        return $this;
    }