public function restoreFromState($stateData)
    {
        $publicProperties = $this->getExposableModelProperties();

        foreach ($publicProperties as $key) {
            if (isset($stateData[$key])) {
                $this->$key = $stateData[$key];
            }
        }
    }
public function restoreFromState($stateData)
    {
        $publicProperties = $this->getExposableModelProperties();

        foreach ($publicProperties as $key) {
            if (isset($stateData[$key])) {
                $this->$key = $stateData[$key];
            }
        }
    }
public function restoreFromState ( $ stateData ) { $ publicProperties = $ this -> getExposableModelProperties ( ) ; foreach ( $ publicProperties as $ key ) { if ( isset ( $ stateData [ $ key ] ) ) { $ this -> $ key = $ stateData [ $ key ] ; } } }
Restores the model from the passed state data.
@param string[] $stateData An associative array of state key value pair strings.
Restores the model from the passed state data .