public function close()
    {
        if ($this->isClosed) {
            // TODO: Should this be an error condition? e.g. BadMethodCallException
            return;
        }

        if (strlen($this->buffer) > 0) {
            $this->insertChunkFromBuffer();
        }

        $this->fileCollectionInsert();
        $this->isClosed = true;
    }
public function close()
    {
        if ($this->isClosed) {
            // TODO: Should this be an error condition? e.g. BadMethodCallException
            return;
        }

        if (strlen($this->buffer) > 0) {
            $this->insertChunkFromBuffer();
        }

        $this->fileCollectionInsert();
        $this->isClosed = true;
    }
public function close ( ) { if ( $ this -> isClosed ) { // TODO: Should this be an error condition? e.g. BadMethodCallException return ; } if ( strlen ( $ this -> buffer ) > 0 ) { $ this -> insertChunkFromBuffer ( ) ; } $ this -> fileCollectionInsert ( ) ; $ this -> isClosed = true ; }
Closes an active stream and flushes all buffered data to GridFS.
Closes an active stream and flushes all buffered data to GridFS .