getRelativePath() public method

public getRelativePath ( string $fileName ) : string
$fileName string
return string
Beispiel #1
0
 private function generateForElement(ElementReflectionInterface $element)
 {
     $template = $this->templateFactory->createNamedForElement('source', $element);
     $template = $this->namespaceAndPackageLoader->loadTemplateWithElementNamespaceOrPackage($template, $element);
     $template->setParameters(['fileName' => $this->relativePathResolver->getRelativePath($element->getFileName()), 'source' => $this->getHighlightedCodeFromElement($element)]);
     $template->save();
 }
Beispiel #2
0
 /**
  * @param string $fileName
  * @return string
  */
 public function relativePath($fileName)
 {
     return $this->relativePathResolver->getRelativePath($fileName);
 }
 private function generateForElement(ReflectionElement $element)
 {
     $template = $this->templateFactory->createNamedForElement(TCO::SOURCE, $element);
     $template->setParameters(['fileName' => $this->relativePathResolver->getRelativePath($element->getFileName()), 'source' => $this->getHighlightedCodeFromElement($element)]);
     $template->save();
 }