public function setData(
        array $value)
    {
        $this->_cache = $value;

        $newObjectData = [];
        foreach ($this->_cache as $k => $v) {
            $newObjectData[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        $this->assignObjectData($newObjectData); // Throws.

        return $this;
    }
public function setData(
        array $value)
    {
        $this->_cache = $value;

        $newObjectData = [];
        foreach ($this->_cache as $k => $v) {
            $newObjectData[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        $this->assignObjectData($newObjectData); // Throws.

        return $this;
    }
public function setData ( array $ value ) { $ this -> _cache = $ value ; $ newObjectData = [ ] ; foreach ( $ this -> _cache as $ k => $ v ) { $ newObjectData [ $ k ] = is_object ( $ v ) && $ v instanceof LazyJsonMapper ? $ v -> asArray ( ) // Throws. : $ v ; // Is already a valid value. } $ this -> assignObjectData ( $ newObjectData ) ; // Throws. return $ this ; }
Set the data array of this unpredictable container.

@param array $value The new data array.

@throws LazyJsonMapperException

@return $this
Set the data array of this unpredictable container .