src/Graviton/ProxyBundle/Service/ApiDefinitionLoader.php
public function getEndpoint($endpoint, $withHost = false, $forceReload = false)
    {
        $this->loadApiDefinition($forceReload);
        $url = "";
        if ($withHost) {
            $url = empty($this->options['host']) ? $this->definition->getHost() : $this->options['host'];
        }

        // If the base path is not already included, we need to add it.
        $url .= (empty($this->options['includeBasePath']) ? $this->definition->getBasePath() : '') . $endpoint;

        return $url;
    }
public function getEndpoint($endpoint, $withHost = false, $forceReload = false)
    {
        $this->loadApiDefinition($forceReload);
        $url = "";
        if ($withHost) {
            $url = empty($this->options['host']) ? $this->definition->getHost() : $this->options['host'];
        }

        // If the base path is not already included, we need to add it.
        $url .= (empty($this->options['includeBasePath']) ? $this->definition->getBasePath() : '') . $endpoint;

        return $url;
    }
public function getEndpoint ( $ endpoint , $ withHost = false , $ forceReload = false ) { $ this -> loadApiDefinition ( $ forceReload ) ; $ url = "" ; if ( $ withHost ) { $ url = empty ( $ this -> options [ 'host' ] ) ? $ this -> definition -> getHost ( ) : $ this -> options [ 'host' ] ; } // If the base path is not already included, we need to add it. $ url .= ( empty ( $ this -> options [ 'includeBasePath' ] ) ? $ this -> definition -> getBasePath ( ) : '' ) . $ endpoint ; return $ url ; }
get an endpoint

@param string  $endpoint    endpoint
@param boolean $withHost    attach host name to the url
@param bool    $forceReload Switch to force a new api definition object will be provided.

@return string
get an endpoint