Example
in package
implements
Tag, StaticMethod
Reflection class for a {@}example tag in a Docblock.
Interfaces, Classes and Traits
Table of Contents
- $content : string|null
- $filePath : string
- $isURI : bool
- $lineCount : int
- $startingLine : int
- __construct() : mixed
- __toString() : string
- Returns a string representation for this tag.
- create() : Tag|mixed
- getContent() : string
- getDescription() : string|null
- getFilePath() : string
- Returns the file path.
- getLineCount() : int
- getName() : string
- getStartingLine() : int
- render() : string
- isUriRelative() : bool
- Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute).
Properties
$content
private
string|null
$content
= null
$filePath
private
string
$filePath
Path to a file to use as an example. May also be an absolute URI.
$isURI
private
bool
$isURI
Whether the file path component represents an URI. This determines how the file portion appears at .
$lineCount
private
int
$lineCount
$startingLine
private
int
$startingLine
Methods
__construct()
public
__construct(string $filePath, bool $isURI, int $startingLine, int $lineCount, string|null $content) : mixed
Parameters
- $filePath : string
- $isURI : bool
- $startingLine : int
- $lineCount : int
- $content : string|null
Return values
mixed —__toString()
Returns a string representation for this tag.
public
__toString() : string
Return values
string —create()
public
static create(string $body) : Tag|mixed
Parameters
- $body : string
Return values
Tag|mixed —Class that implements Tag
getContent()
public
getContent() : string
Return values
string —getDescription()
public
getDescription() : string|null
Return values
string|null —getFilePath()
Returns the file path.
public
getFilePath() : string
Return values
string —Path to a file to use as an example. May also be an absolute URI.
getLineCount()
public
getLineCount() : int
Return values
int —getName()
public
getName() : string
Return values
string —getStartingLine()
public
getStartingLine() : int
Return values
int —render()
public
render([Formatter|null $formatter = null ]) : string
Parameters
- $formatter : Formatter|null = null
Return values
string —isUriRelative()
Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute).
private
isUriRelative(string $uri) : bool
Parameters
- $uri : string