public function getDocument()
    {
        $data = $this->toArray();
        
        // restore document id
        $data['_id'] = $data['__documentId__'];
        
        // unset meta fields
        unset($data['__date__'], $data['__documentId__']);
        
        return $this
            ->baseCollection
            ->hydrate($data);
    }
public function getDocument()
    {
        $data = $this->toArray();
        
        // restore document id
        $data['_id'] = $data['__documentId__'];
        
        // unset meta fields
        unset($data['__date__'], $data['__documentId__']);
        
        return $this
            ->baseCollection
            ->hydrate($data);
    }
public function getDocument ( ) { $ data = $ this -> toArray ( ) ; // restore document id $ data [ '_id' ] = $ data [ '__documentId__' ] ; // unset meta fields unset ( $ data [ '__date__' ] , $ data [ '__documentId__' ] ) ; return $ this -> baseCollection -> hydrate ( $ data ) ; }
Get document instance

@return \Sokil\Mongo\Document
Get document instance