ExampleDescriptor
extends TagDescriptor
in package
Descriptor representing the example tag.
Table of Contents
Properties
- $description : DescriptionDescriptor|null
- $errors : Collection<string|int, Error>
- $name : string
- $example : string
- $filePath : string
- $lineCount : int|null
- $startingLine : int|null
Methods
- __construct() : mixed
- Initializes the tag by setting the name and errors,
- __toString() : string
- getDescription() : DescriptionDescriptor
- Returns the description for this element.
- getErrors() : Collection<string|int, Error>
- Returns all errors associated with this tag.
- getExample() : string
- Returns the content of the example.
- getFilePath() : string
- Returns the location where this example points to.
- getLineCount() : int|null
- Returns the location where this example points to.
- getName() : string
- Returns the name for this element.
- getStartingLine() : int|null
- Returns the location where this example points to.
- setDescription() : void
- Sets a description or none to inherit from a parent.
- setExample() : void
- Returns the content of the example.
- setFilePath() : void
- Sets the location where the example points to.
- setLineCount() : void
- Returns the location where this example points to.
- setStartingLine() : void
- Returns the location where this example points to.
Properties
$description
protected
DescriptionDescriptor|null
$description
= null
$errors
protected
Collection<string|int, Error>
$errors
A collection of errors found during filtering.
$name
protected
string
$name
= ''
$example
private
string
$example
= ''
the content of the example.
$filePath
private
string
$filePath
= ''
the content of the example.
$lineCount
private
int|null
$lineCount
= null
the content of the example.
$startingLine
private
int|null
$startingLine
= null
the content of the example.
Methods
__construct()
Initializes the tag by setting the name and errors,
public
__construct(string $name[, DescriptionDescriptor|null $description = null ]) : mixed
Parameters
- $name : string
- $description : DescriptionDescriptor|null = null
__toString()
public
__toString() : string
Return values
stringgetDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptorgetErrors()
Returns all errors associated with this tag.
public
getErrors() : Collection<string|int, Error>
Return values
Collection<string|int, Error>getExample()
Returns the content of the example.
public
getExample() : string
Return values
stringgetFilePath()
Returns the location where this example points to.
public
getFilePath() : string
Return values
stringgetLineCount()
Returns the location where this example points to.
public
getLineCount() : int|null
Return values
int|nullgetName()
Returns the name for this element.
public
getName() : string
Return values
stringgetStartingLine()
Returns the location where this example points to.
public
getStartingLine() : int|null
Return values
int|nullsetDescription()
Sets a description or none to inherit from a parent.
public
setDescription(DescriptionDescriptor|null $description) : void
Parameters
- $description : DescriptionDescriptor|null
setExample()
Returns the content of the example.
public
setExample(string $example) : void
Parameters
- $example : string
setFilePath()
Sets the location where the example points to.
public
setFilePath(string $filePath) : void
Parameters
- $filePath : string
setLineCount()
Returns the location where this example points to.
public
setLineCount(int $lineCount) : void
Parameters
- $lineCount : int
setStartingLine()
Returns the location where this example points to.
public
setStartingLine(int $startingLine) : void
Parameters
- $startingLine : int