code: 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;
      }
docs: Build namespace given ApiDefinition and base namespace
  
  @param  ApiDefinition $definition Checks if definition has version
  @param  string        $namespace  Base
  @return string