Sokil\Mongo\Structure::setDataReference PHP Method

setDataReference() protected method

This method allow set data of document in external code. e.g. link data of document to GridFS file matadata. Modification of document's data will modify external data too. Note that also the opposite case also right - modification of external data will modify document's data directly, so document may be in unconsisted state.
protected setDataReference ( array &$data ) : Structure
$data array reference to data in external code
return Structure
    protected function setDataReference(array &$data)
    {
        $this->data =& $data;
        return $this;
    }