src/WebService.php
protected function build( $service ){

            $this->validateConfig( $service );

            // set default endpoint
            $this->setEndpoint();

            // set web service parameters
            $this->service = config('googlemaps.service.'.$service);

            // is service key set, use it, otherwise use default key
            $this->key = empty( $this->service['key'] )
                         ? config('googlemaps.key')
                         : $this->service['key'];

            // set service url
            $this->requestUrl = $this->service['url'];

            // is ssl_verify_peer key set, use it, otherwise use default key
            $this->verifySSL = empty(config('googlemaps.ssl_verify_peer'))
                            ? FALSE
                            :config('googlemaps.ssl_verify_peer');

            $this->clearParameters();
    }
protected function build( $service ){

            $this->validateConfig( $service );

            // set default endpoint
            $this->setEndpoint();

            // set web service parameters
            $this->service = config('googlemaps.service.'.$service);

            // is service key set, use it, otherwise use default key
            $this->key = empty( $this->service['key'] )
                         ? config('googlemaps.key')
                         : $this->service['key'];

            // set service url
            $this->requestUrl = $this->service['url'];

            // is ssl_verify_peer key set, use it, otherwise use default key
            $this->verifySSL = empty(config('googlemaps.ssl_verify_peer'))
                            ? FALSE
                            :config('googlemaps.ssl_verify_peer');

            $this->clearParameters();
    }
protected function build ( $ service ) { $ this -> validateConfig ( $ service ) ; // set default endpoint $ this -> setEndpoint ( ) ; // set web service parameters $ this -> service = config ( 'googlemaps.service.' . $ service ) ; // is service key set, use it, otherwise use default key $ this -> key = empty ( $ this -> service [ 'key' ] ) ? config ( 'googlemaps.key' ) : $ this -> service [ 'key' ] ; // set service url $ this -> requestUrl = $ this -> service [ 'url' ] ; // is ssl_verify_peer key set, use it, otherwise use default key $ this -> verifySSL = empty ( config ( 'googlemaps.ssl_verify_peer' ) ) ? FALSE : config ( 'googlemaps.ssl_verify_peer' ) ; $ this -> clearParameters ( ) ; }
Setup service parameters
Setup service parameters