Class used to find an example file's location based on a given ExampleDescriptor.
Methods |
public
find
(
phpDocumentor Attempts to find the example contents for the given descriptor. |
public
getExampleDirectories
() :
array
Returns a series of directories that may contain examples.
|
public
getSourceDirectory
() :
string
Returns the project's root directory where an 'examples' folder can be expected. |
public
setExampleDirectories
(
array
$directories
) :
void
Registers a series of directories that may contain examples.
|
public
setSourceDirectory
(
string
$directory
=
''
) :
void
Registers the project's root directory where an 'examples' folder can be expected. |
Properties |
private
$exampleDirectories
|
private
$sourceDirectory
|
Methods |
private
constructExamplePath
(
string
$directory
,
string
$file
) :
string
Returns a path to the example file in the given directory. . |
private
getExampleFileContents
(
string
$filename
) : ?
array
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
|
private
getExamplePathFromExampleDirectory
(
string
$file
) :
string
Get example filepath based on the example directory inside your project. |
private
getExamplePathFromSource
(
string
$file
) :
string
Get example filepath based on sourcecode. |