src/Graviton/ProxyBundle/Definition/ApiDefinition.php
public function getEndpoints($withHost = true, $prefix = null, $host = '', $withBasePath = true)
    {
        $endpoints = [];
        $basePath = "";
        if ($withHost) {
            $basePath = (empty($host)) ? $this->getHost() : $host;
        }
        if (!empty($prefix)) {
            $basePath .= $prefix;
        }
        if ($withBasePath && isset($this->basePath)) {
            $basePath .= $this->basePath;
        }
        foreach ($this->endpoints as $endpoint) {
            $endpoints[] = $basePath.$endpoint;
        }

        return $endpoints;
    }
public function getEndpoints($withHost = true, $prefix = null, $host = '', $withBasePath = true)
    {
        $endpoints = [];
        $basePath = "";
        if ($withHost) {
            $basePath = (empty($host)) ? $this->getHost() : $host;
        }
        if (!empty($prefix)) {
            $basePath .= $prefix;
        }
        if ($withBasePath && isset($this->basePath)) {
            $basePath .= $this->basePath;
        }
        foreach ($this->endpoints as $endpoint) {
            $endpoints[] = $basePath.$endpoint;
        }

        return $endpoints;
    }
public function getEndpoints ( $ withHost = true , $ prefix = null , $ host = '' , $ withBasePath = true ) { $ endpoints = [ ] ; $ basePath = "" ; if ( $ withHost ) { $ basePath = ( empty ( $ host ) ) ? $ this -> getHost ( ) : $ host ; } if ( ! empty ( $ prefix ) ) { $ basePath .= $ prefix ; } if ( $ withBasePath && isset ( $ this -> basePath ) ) { $ basePath .= $ this -> basePath ; } foreach ( $ this -> endpoints as $ endpoint ) { $ endpoints [ ] = $ basePath . $ endpoint ; } return $ endpoints ; }
get all defined API endpoints

@param boolean $withHost     url with hostname
@param string  $prefix       add a prefix to the url (blub/endpoint/url)
@param string  $host         Host to be used instead of the host defined in the swagger json
@param bool    $withBasePath Defines whether the API's base path should be included or not

@return array
get all defined API endpoints