src/App/src/Entity/AbstractEntity.php
/**
     * Exchange internal values from provided array
     *
     * @param array $array
     * @return void
     */
Exchange internal values from provided array
@param array $array
@return void
Exchange internal values from provided array @param array $array @return void
public function exchangeArray(array $array)
    {
        foreach ($array as $property => $values) {
            if (is_array($values)) {
                $method = 'add' . ucfirst($property);
                if (!method_exists($this, $method)) {
                    continue;
                }
                foreach ($values as $value) {
                    $this->$method($value);
                }
            } else {
                $method = 'set' . ucfirst($property);
                if (!method_exists($this, $method)) {
                    continue;
                }
                $this->$method($values);
            }
        }
    }
public function exchangeArray ( array $ array ) { foreach ( $ array as $ property => $ values ) { if ( is_array ( $ values ) ) { $ method = 'add' . ucfirst ( $ property ) ; if ( ! method_exists ( $ this , $ method ) ) { continue ; } foreach ( $ values as $ value ) { $ this -> $ method ( $ value ) ; } } else { $ method = 'set' . ucfirst ( $ property ) ; if ( ! method_exists ( $ this , $ method ) ) { continue ; } $ this -> $ method ( $ values ) ; } } }
Exchange internal values from provided array
 @param array $array
 @return void
Exchange internal values from provided array @param array $array @return void