function import($data)
    {
        if ($data === null)
            return $this;

        if (!(is_array($data) || $data instanceof \Traversable || $data instanceof \stdClass))
            throw new \InvalidArgumentException(sprintf(
                'Data must be instance of \Traversable, \stdClass or array. given: (%s)'
                , \Poirot\Std\flatten($data)
            ));

        if ($data instanceof \stdClass)
            $data = \Poirot\Std\toArrayObject($data);

        
        foreach ($data as $k => $v)
            $this->set($k, $v);

        return $this;
    }
function import($data)
    {
        if ($data === null)
            return $this;

        if (!(is_array($data) || $data instanceof \Traversable || $data instanceof \stdClass))
            throw new \InvalidArgumentException(sprintf(
                'Data must be instance of \Traversable, \stdClass or array. given: (%s)'
                , \Poirot\Std\flatten($data)
            ));

        if ($data instanceof \stdClass)
            $data = \Poirot\Std\toArrayObject($data);

        
        foreach ($data as $k => $v)
            $this->set($k, $v);

        return $this;
    }
function import ( $ data ) { if ( $ data === null ) return $ this ; if ( ! ( is_array ( $ data ) || $ data instanceof \ Traversable || $ data instanceof \ stdClass ) ) throw new \ InvalidArgumentException ( sprintf ( 'Data must be instance of \Traversable, \stdClass or array. given: (%s)' , \ Poirot \ Std \ flatten ( $ data ) ) ) ; if ( $ data instanceof \ stdClass ) $ data = \ Poirot \ Std \ toArrayObject ( $ data ) ; foreach ( $ data as $ k => $ v ) $ this -> set ( $ k , $ v ) ; return $ this ; }
Import Data Into Current Realm

@param array|\Traversable|null $data

@throws \InvalidArgumentException
@return $this
Import Data Into Current Realm