Phalcon\Db\Adapter\MongoDB\GridFS\WritableStream::insertChunk PHP Method

insertChunk() private method

private insertChunk ( $data )
    private function insertChunk($data)
    {
        if ($this->isClosed) {
            // TODO: Should this be an error condition? e.g. BadMethodCallException
            return;
        }
        $toUpload = ['files_id' => $this->file['_id'], 'n' => $this->chunkOffset, 'data' => new Binary($data, Binary::TYPE_GENERIC)];
        hash_update($this->ctx, $data);
        $this->collectionWrapper->insertChunk($toUpload);
        $this->length += strlen($data);
        $this->chunkOffset++;
    }