src/Struct/CollectionObject.php
function setData($object, array $data)
    {
        if (! $this->has($object) )
            throw new \Exception('Object Not Found.');

        if ($data == array_values($data))
            throw new \InvalidArgumentException('Data tags must be associative array.');


        $hash = $this->genETag($object);
        $this->_objs[$hash]['data'] = $data;
        return $this;
    }
function setData($object, array $data)
    {
        if (! $this->has($object) )
            throw new \Exception('Object Not Found.');

        if ($data == array_values($data))
            throw new \InvalidArgumentException('Data tags must be associative array.');


        $hash = $this->genETag($object);
        $this->_objs[$hash]['data'] = $data;
        return $this;
    }
function setData ( $ object , array $ data ) { if ( ! $ this -> has ( $ object ) ) throw new \ Exception ( 'Object Not Found.' ) ; if ( $ data == array_values ( $ data ) ) throw new \ InvalidArgumentException ( 'Data tags must be associative array.' ) ; $ hash = $ this -> genETag ( $ object ) ; $ this -> _objs [ $ hash ] [ 'data' ] = $ data ; return $ this ; }
Set Data For Stored Object

note: use ETag to attain target object for
performance

@param object $object
@param array $data Associative Array

@throws \Exception Object not stored
@return $this
Set Data For Stored Object