private function insertChunk($data)
    {
        $chunkDocument = [
            'files_id' => $this->_documentId,
            'n' => $this->chunkCount,
            'data' => new Binary($data, Binary::TYPE_GENERIC),
        ];

        hash_update($this->_hashContext, $data);

        $this->collection->getChunkCollection()->insert($chunkDocument);
        $this->length += StringHelper::byteLength($data);
        $this->chunkCount++;
    }
private function insertChunk($data)
    {
        $chunkDocument = [
            'files_id' => $this->_documentId,
            'n' => $this->chunkCount,
            'data' => new Binary($data, Binary::TYPE_GENERIC),
        ];

        hash_update($this->_hashContext, $data);

        $this->collection->getChunkCollection()->insert($chunkDocument);
        $this->length += StringHelper::byteLength($data);
        $this->chunkCount++;
    }
private function insertChunk ( $ data ) { $ chunkDocument = [ 'files_id' => $ this -> _documentId , 'n' => $ this -> chunkCount , 'data' => new Binary ( $ data , Binary :: TYPE_GENERIC ) , ] ; hash_update ( $ this -> _hashContext , $ data ) ; $ this -> collection -> getChunkCollection ( ) -> insert ( $ chunkDocument ) ; $ this -> length += StringHelper :: byteLength ( $ data ) ; $ this -> chunkCount ++ ; }
Inserts file chunk.
@param string $data chunk binary content.
Inserts file chunk .