src/Tool/ConfigurationTrait.php
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
protected function setConfig ( $ value , $ key ) { $ setter = 'set' . ucfirst ( $ key ) ; if ( method_exists ( $ this , $ setter ) ) { $ this -> $ setter ( $ value ) ; } elseif ( property_exists ( $ this , $ key ) ) { $ this -> $ key = $ value ; } return $ this ; }
Attempts to set a given value.

@param mixed   $value
@param string  $key

@return mixed
Attempts to set a given value .