Documentation

PHP_TokenWithScopeAndVisibility extends PHP_TokenWithScope
in package

A PHP token.

Table of Contents

$endTokenId  : int
$id  : int
$line  : int
$text  : string
$tokenStream  : PHP_Token_Stream
__construct()  : mixed
Constructor.
__toString()  : string
getDocblock()  : string|null
Get the docblock for this token
getEndLine()  : int
getEndTokenId()  : int
getKeywords()  : string
getLine()  : int
getVisibility()  : string

Properties

$endTokenId

protected int $endTokenId

$text

protected string $text

Methods

__construct()

Constructor.

public __construct(string $text, int $line, PHP_Token_Stream $tokenStream, int $id) : mixed
Parameters
$text : string
$line : int
$tokenStream : PHP_Token_Stream
$id : int
Return values
mixed

__toString()

public __toString() : string
Return values
string

getDocblock()

Get the docblock for this token

public getDocblock() : string|null

This method will fetch the docblock belonging to the current token. The docblock must be placed on the line directly above the token to be recognized.

Return values
string|null

Returns the docblock as a string if found

getEndLine()

public getEndLine() : int
Return values
int

getEndTokenId()

public getEndTokenId() : int
Return values
int

getKeywords()

public getKeywords() : string
Return values
string

getLine()

public getLine() : int
Return values
int

getVisibility()

public getVisibility() : string
Return values
string

Search results