PhpSpec\Locator\Resource::getSrcNamespace PHP Метод

getSrcNamespace() публичный Метод

public getSrcNamespace ( ) : string
Результат string
    public function getSrcNamespace();

Usage Example

Пример #1
0
 /**
  * @param Resource $resource
  * @param string            $filepath
  *
  * @return string
  */
 protected function renderTemplate(Resource $resource, $filepath)
 {
     $values = array('%filepath%' => $filepath, '%name%' => $resource->getName(), '%namespace%' => $resource->getSrcNamespace(), '%namespace_block%' => '' !== $resource->getSrcNamespace() ? sprintf("\n\nnamespace %s;", $resource->getSrcNamespace()) : '');
     if (!($content = $this->getTemplateRenderer()->render('class', $values))) {
         $content = $this->getTemplateRenderer()->renderString($this->getTemplate(), $values);
     }
     return $content;
 }
All Usage Examples Of PhpSpec\Locator\Resource::getSrcNamespace