protected function buildStreamContext()
    {
        $opts = [];

        // If we have a logger defined, merge the context options from our logger with the context array
        if ($this->logQueries() && $logger = $this->logger()) {
            $opts['mongodb'] = $logger->getContext();
        }

        $context = stream_context_create($opts);
        return ['context' => $context];
    }
protected function buildStreamContext()
    {
        $opts = [];

        // If we have a logger defined, merge the context options from our logger with the context array
        if ($this->logQueries() && $logger = $this->logger()) {
            $opts['mongodb'] = $logger->getContext();
        }

        $context = stream_context_create($opts);
        return ['context' => $context];
    }
protected function buildStreamContext ( ) { $ opts = [ ] ; // If we have a logger defined, merge the context options from our logger with the context array if ( $ this -> logQueries ( ) && $ logger = $ this -> logger ( ) ) { $ opts [ 'mongodb' ] = $ logger -> getContext ( ) ; } $ context = stream_context_create ( $ opts ) ; return [ 'context' => $ context ] ; }
Builds our context object for passing in query logging options as well as the SSL context for HTTPS

@return array
Builds our context object for passing in query logging options as well as the SSL context for HTTPS