getVersion() public method

Get the version string of the API
public getVersion ( ) : string
return string
コード例 #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);
 }
コード例 #2
0
ファイル: RamlConverter.php プロジェクト: thoomi/api2symfony
 /**
  * Build namespace given ApiDefinition and base namespace
  *
  * @param  ApiDefinition $definition Checks if definition has version
  * @param  string        $namespace  Base
  * @return string
  */
 protected function buildNamespace(ApiDefinition $definition, $namespace)
 {
     if ($this->config['version_in_namespace'] && $definition->getVersion()) {
         $namespace .= '\\' . preg_replace(array('/(^[0-9])/', '/[^a-zA-Z0-9]/'), array('Version\\1', '_'), $definition->getVersion());
     }
     return $namespace;
 }
コード例 #3
0
ファイル: RAML.php プロジェクト: RETFU/RREST
 /**
  * {@inheritdoc}
  */
 public function getRoutePath()
 {
     return '/' . $this->apiDefinition->getVersion() . $this->resource->getUri();
 }