public function configure(array $properties)
    {
        foreach ($properties as $name => $value) {
            $methodName = 'set' . ucfirst(strtolower($name));
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
public function configure(array $properties)
    {
        foreach ($properties as $name => $value) {
            $methodName = 'set' . ucfirst(strtolower($name));
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
public function configure ( array $ properties ) { foreach ( $ properties as $ name => $ value ) { $ methodName = 'set' . ucfirst ( strtolower ( $ name ) ) ; if ( method_exists ( $ this , $ methodName ) ) { $ this -> $ methodName ( $ value ) ; } } }
Associate given values to appropriate class properties.

@param array $properties Associative array of properties values.
Associate given values to appropriate class properties .