Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExampleFinder.php

function ExampleFinder::getExamplePathFromSource

Get example filepath based on sourcecode.

1 call to ExampleFinder::getExamplePathFromSource()
ExampleFinder::getExampleFileContents in vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php
Attempts to find the requested example file and returns its contents or null if no file was found.

File

vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php, line 149

Class

ExampleFinder
Class used to find an example file's location based on a given ExampleDescriptor.

Namespace

phpDocumentor\Reflection\DocBlock

Code

private function getExamplePathFromSource(string $file) : string {
    return sprintf('%s%s%s', trim($this->getSourceDirectory(), '\\/'), DIRECTORY_SEPARATOR, trim($file, '"'));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal