public function exchangeArray($data)
    {
        foreach ($data as $property => $value) {
            if (isset($this->$property)) {
                $method = 'set' . ucfirst($property);
                $this->$method($value);
            }
        }
    }
public function exchangeArray($data)
    {
        foreach ($data as $property => $value) {
            if (isset($this->$property)) {
                $method = 'set' . ucfirst($property);
                $this->$method($value);
            }
        }
    }
public function exchangeArray ( $ data ) { foreach ( $ data as $ property => $ value ) { if ( isset ( $ this -> $ property ) ) { $ method = 'set' . ucfirst ( $ property ) ; $ this -> $ method ( $ value ) ; } } }
Maps the specified data to the properties of this object

@param array $data
Maps the specified data to the properties of this object