original_string: public function getEndpoint()
      {
          $basePath = $this->app['config']->get('api.base_path', self::DEFAULT_BASE_PATH);
          $basePath = $this->stripTrailingSlash($basePath);
  
          // determine the base URL for the API,
          // i.e. https://api.example.com/v1
          $urlBase = $this->app['config']->get('api.url');
          if ($urlBase) {
              $urlBase = $this->stripTrailingSlash($urlBase);
          } else {
              // no base URL was defined so we're going to generate one
              $urlBase = $this->app['base_url'];
              $urlBase = $this->stripTrailingSlash($urlBase).$basePath;
          }
  
          // get the requested path, strip any trailing '/'
          $path = $this->stripTrailingSlash($this->request->path());
  
          // strip out the base path (i.e. /api/v1) from the
          // requested path
          if ($basePath) {
              $path = str_replace($basePath, '', $path);
          }
  
          return $urlBase.$path;
      }
code: public function getEndpoint()
      {
          $basePath = $this->app['config']->get('api.base_path', self::DEFAULT_BASE_PATH);
          $basePath = $this->stripTrailingSlash($basePath);
  
          // determine the base URL for the API,
          // i.e. https://api.example.com/v1
          $urlBase = $this->app['config']->get('api.url');
          if ($urlBase) {
              $urlBase = $this->stripTrailingSlash($urlBase);
          } else {
              // no base URL was defined so we're going to generate one
              $urlBase = $this->app['base_url'];
              $urlBase = $this->stripTrailingSlash($urlBase).$basePath;
          }
  
          // get the requested path, strip any trailing '/'
          $path = $this->stripTrailingSlash($this->request->path());
  
          // strip out the base path (i.e. /api/v1) from the
          // requested path
          if ($basePath) {
              $path = str_replace($basePath, '', $path);
          }
  
          return $urlBase.$path;
      }
code_tokens: public function getEndpoint ( ) { $ basePath = $ this -> app [ 'config' ] -> get ( 'api.base_path' , self :: DEFAULT_BASE_PATH ) ; $ basePath = $ this -> stripTrailingSlash ( $ basePath ) ; // determine the base URL for the API, // i.e. https://api.example.com/v1 $ urlBase = $ this -> app [ 'config' ] -> get ( 'api.url' ) ; if ( $ urlBase ) { $ urlBase = $ this -> stripTrailingSlash ( $ urlBase ) ; } else { // no base URL was defined so we're going to generate one $ urlBase = $ this -> app [ 'base_url' ] ; $ urlBase = $ this -> stripTrailingSlash ( $ urlBase ) . $ basePath ; } // get the requested path, strip any trailing '/' $ path = $ this -> stripTrailingSlash ( $ this -> request -> path ( ) ) ; // strip out the base path (i.e. /api/v1) from the // requested path if ( $ basePath ) { $ path = str_replace ( $ basePath , '' , $ path ) ; } return $ urlBase . $ path ; }
docstring: Gets the full URL for this API route.
  
  @return string
docstring_tokens: Gets the full URL for this API route .