Sokil\Mongo\GridFS::hydrate PHP Метод

hydrate() публичный Метод

Factory method to get document object from array of stored document
public hydrate ( MongoGridFSFile $data, $useDocumentPool = true ) : Sokil\Mongo\GridFsFile
$data MongoGridFSFile
Результат Sokil\Mongo\GridFsFile
    public function hydrate($data, $useDocumentPool = true)
    {
        if ($data instanceof \MongoGridFSFile === false) {
            throw new Exception('Must be \\MongoGridFSFile');
        }
        $className = $this->getFileClassName($data);
        return new $className($this, $data);
    }