protected function loadData(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }
protected function loadData(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }
protected function loadData ( array $ data = [ ] ) { foreach ( $ data as $ key => $ value ) { if ( property_exists ( $ this , $ key ) ) { $ this -> $ key = $ value ; } } }
Attempts to map array data to object properties.

@param array $data Key value data to populate object properties.

@return void
Attempts to map array data to object properties .