public function setProperties($propValues)
    {
        foreach ($propValues as $propName => $propValue) {
            if (property_exists($this, $propName)) {
                $this->{$propName} = $propValue;
            } else {
                $this->throwException('Property "%propName%" does not exist in class "%className%"', array(
                    '%propName%'  => $propName,
                    '%className%' => static::className(),
                ));
            }
        }
    }
public function setProperties($propValues)
    {
        foreach ($propValues as $propName => $propValue) {
            if (property_exists($this, $propName)) {
                $this->{$propName} = $propValue;
            } else {
                $this->throwException('Property "%propName%" does not exist in class "%className%"', array(
                    '%propName%'  => $propName,
                    '%className%' => static::className(),
                ));
            }
        }
    }
public function setProperties ( $ propValues ) { foreach ( $ propValues as $ propName => $ propValue ) { if ( property_exists ( $ this , $ propName ) ) { $ this -> { $ propName } = $ propValue ; } else { $ this -> throwException ( 'Property "%propName%" does not exist in class "%className%"' , array ( '%propName%' => $ propName , '%className%' => static :: className ( ) , ) ) ; } } }
Sets properties values

@param array $propValues Array of properties values in format: ['propName' => 'propValue']
Sets properties values