PHP Class Patchwork\CodeManipulation\Source

Show file Open project: antecedent/patchwork Class Usage Examples

Public Properties

Property Type Description
$code
$file
$levelBeginnings
$levelEndings
$levels
$matchingBrackets
$spliceLengths
$splices
$tokens
$tokensByLevel
$tokensByLevelAndType
$tokensByType

Public Methods

Method Description
__construct ( $string )
__toString ( )
all ( $types )
collectBracketMatchings ( )
collectLevelInfo ( )
createCodeFromTokens ( )
flush ( )
has ( $types )
indexTokensByType ( )
initialize ( )
is ( $types, $offset )
junk ( )
lastSibling ( $offset )
match ( $offset )
next ( $types, $offset )
nextSibling ( $types, $offset )
read ( $offset, $count = 1 )
siblings ( $types, $offset )
skip ( $types, $offset, $direction = 1 )
skipBack ( $types, $offset )
splice ( $splice, $offset, $length, $policy = self::OVERWRITE )
within ( $types, $low, $high )

Method Details

__construct() public method

public __construct ( $string )

__toString() public method

public __toString ( )

all() public method

public all ( $types )

collectBracketMatchings() public method

collectLevelInfo() public method

public collectLevelInfo ( )

createCodeFromTokens() public method

flush() public method

public flush ( )

has() public method

public has ( $types )

indexTokensByType() public method

public indexTokensByType ( )

initialize() public method

public initialize ( )

is() public method

public is ( $types, $offset )

junk() static public method

static public junk ( )

lastSibling() public method

public lastSibling ( $offset )

match() public method

public match ( $offset )

next() public method

public next ( $types, $offset )

nextSibling() public method

public nextSibling ( $types, $offset )

read() public method

public read ( $offset, $count = 1 )

siblings() public method

public siblings ( $types, $offset )

skip() public method

public skip ( $types, $offset, $direction = 1 )

skipBack() public method

public skipBack ( $types, $offset )

splice() public method

public splice ( $splice, $offset, $length, $policy = self::OVERWRITE )

within() public method

public within ( $types, $low, $high )

Property Details

$code public property

public $code

$file public property

public $file

$levelBeginnings public property

public $levelBeginnings

$levelEndings public property

public $levelEndings

$levels public property

public $levels

$matchingBrackets public property

public $matchingBrackets

$spliceLengths public property

public $spliceLengths

$splices public property

public $splices

$tokens public property

public $tokens

$tokensByLevel public property

public $tokensByLevel

$tokensByLevelAndType public property

public $tokensByLevelAndType

$tokensByType public property

public $tokensByType