phpDocumentor\Reflection\DocBlock\Tag\ExampleTag::getFilePath PHP Method

getFilePath() public method

Returns the file path.
public getFilePath ( ) : string
return string Path to a file to use as an example. May also be an absolute URI.
    public function getFilePath()
    {
        return $this->filePath;
    }

Usage Example

 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param ExampleTag $data
  *
  * @throws \InvalidArgumentException if the provided parameter is not of type ExampleTag; the interface won't let
  *   up typehint the signature.
  *
  * @return ExampleDescriptor
  */
 public function create($data)
 {
     if (!$data instanceof ExampleTag) {
         throw new \InvalidArgumentException('The ExampleAssembler expected an ExampleTag object to base the descriptor on');
     }
     $descriptor = new ExampleDescriptor($data->getName());
     $descriptor->setFilePath((string) $data->getFilePath());
     $descriptor->setStartingLine($data->getStartingLine());
     $descriptor->setLineCount($data->getLineCount());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setExample($this->finder->find($descriptor));
     return $descriptor;
 }