\phpDocumentor\Descriptor\ExampleFinder

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

Summary

Methods
Properties
Constants
find()
setSourceDirectory()
getSourceDirectory()
setExampleDirectories()
getExampleDirectories()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getExampleFileContents()
getExamplePathFromExampleDirectory()
constructExamplePath()
getExamplePathFromSource()
$sourceDirectory
$exampleDirectories
N/A

Properties

$sourceDirectory

$sourceDirectory
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string

$exampleDirectories

$exampleDirectories
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
 : 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string[]

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Type

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string[] —

Methods

find()

find(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Descriptor\Tag\ExampleDescriptor  $descriptor) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Attempts to find the example contents for the given descriptor.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 \phpDocumentor\Descriptor\Tag\ExampleDescriptor $descriptor
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

setSourceDirectory()

setSourceDirectory(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $directory = '') 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: void

Registers the project's root directory where an 'examples' folder can be expected.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $directory
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

getSourceDirectory()

getSourceDirectory() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Returns the project's root directory where an 'examples' folder can be expected.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

setExampleDirectories()

setExampleDirectories(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string[]  $directories = []) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: void

Registers a series of directories that may contain examples.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string[] $directories
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

getExampleDirectories()

getExampleDirectories() 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string[]

Returns a series of directories that may contain examples.

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string[] —

getExampleFileContents()

getExampleFileContents(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $filename) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: ?string[]

Attempts to find the requested example file and returns its contents or null if no file was found.

This method will try several methods in search of the given example file, the first one it encounters is returned:

  1. Iterates through all examples folders for the given filename
  2. Checks the source folder for the given filename
  3. Checks the 'examples' folder in the current working directory for examples
  4. Checks the path relative to the current working directory for the given filename

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $filename
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 ?string[] —

getExamplePathFromExampleDirectory()

getExamplePathFromExampleDirectory(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $file) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Get example filepath based on the example directory inside your project.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $file
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

constructExamplePath()

constructExamplePath(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $directory, 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $file) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Returns a path to the example file in the given directory.

.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $directory
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $file
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —

getExamplePathFromSource()

getExamplePathFromSource(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string  $file) 
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string

Get example filepath based on sourcecode.

Parameters

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string $file
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50

Returns

Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50 string —