public function getChunkCursor($refresh = false)
    {
        if ($refresh || $this->_chunkCursor === null) {
            $file = $this->getDocument();
            $this->_chunkCursor = $this->collection->getChunkCollection()->find(
                ['files_id' => $file['_id']],
                [],
                ['sort' => ['n' => 1]]
            );
        }
        return $this->_chunkCursor;
    }
public function getChunkCursor($refresh = false)
    {
        if ($refresh || $this->_chunkCursor === null) {
            $file = $this->getDocument();
            $this->_chunkCursor = $this->collection->getChunkCollection()->find(
                ['files_id' => $file['_id']],
                [],
                ['sort' => ['n' => 1]]
            );
        }
        return $this->_chunkCursor;
    }
public function getChunkCursor ( $ refresh = false ) { if ( $ refresh || $ this -> _chunkCursor === null ) { $ file = $ this -> getDocument ( ) ; $ this -> _chunkCursor = $ this -> collection -> getChunkCollection ( ) -> find ( [ 'files_id' => $ file [ '_id' ] ] , [ ] , [ 'sort' => [ 'n' => 1 ] ] ) ; } return $ this -> _chunkCursor ; }
Returns file chunks read cursor.
@param bool $refresh whether to recreate cursor, if it is already exist.
@return \MongoDB\Driver\Cursor chuck list cursor.
@throws InvalidConfigException
Returns file chunks read cursor .