Raml\ApiDefinition::getBaseUrl PHP Method

getBaseUrl() public method

Get the base URI
public getBaseUrl ( ) : string
return string
    public function getBaseUrl()
    {
        return $this->version ? str_replace('{version}', $this->version, $this->baseUrl) : $this->baseUrl;
    }

Usage Example

コード例 #1
0
ファイル: Generator.php プロジェクト: urisavka/raml2html
 /**
  * @param string $output file to generate
  */
 public function generate($output)
 {
     $html = $this->twig->render('index.html.twig', array('title' => $this->specification->getTitle(), 'base_url' => $this->specification->getBaseUrl(), 'security' => $this->specification->getSecuritySchemes(), 'resources' => $this->specification->getResources(), 'documentation' => $this->specification->getDocumentationList(), 'base_dir_raml' => $this->base_dir_raml, 'version' => $this->specification->getVersion()));
     file_put_contents($output, $html);
 }
All Usage Examples Of Raml\ApiDefinition::getBaseUrl