public function hydrate(stdClass $input, $strict = false) {
        $this->strict = $strict;
        $failedStrict = [];
        foreach($input as $name => $value) {
            if ($this->strict && !property_exists($this,$name)){
                $failedStrict[$name] = $value;
            } else {
                $this->$name = $value;
            }
        }
        
        if (count($failedStrict)) {
            $this->strictError($failedStrict);
        }
    }
public function hydrate(stdClass $input, $strict = false) {
        $this->strict = $strict;
        $failedStrict = [];
        foreach($input as $name => $value) {
            if ($this->strict && !property_exists($this,$name)){
                $failedStrict[$name] = $value;
            } else {
                $this->$name = $value;
            }
        }
        
        if (count($failedStrict)) {
            $this->strictError($failedStrict);
        }
    }
public function hydrate ( stdClass $ input , $ strict = false ) { $ this -> strict = $ strict ; $ failedStrict = [ ] ; foreach ( $ input as $ name => $ value ) { if ( $ this -> strict && ! property_exists ( $ this , $ name ) ) { $ failedStrict [ $ name ] = $ value ; } else { $ this -> $ name = $ value ; } } if ( count ( $ failedStrict ) ) { $ this -> strictError ( $ failedStrict ) ; } }
Given a class object, hydrate it from a provided stdClass data object.

@param $input stdClass - the data to dump into the class being hydrated.
@param $strict bool - what to do if the data provided isn't an option in the class being hydrated.
Given a class object hydrate it from a provided stdClass data object .