Documentation

TreenodePathMatcher
in package
implements TreenodeMatcher

Matches a node which has a specified path.

Path can be specified with either slash (/) or backslash ()

Table of Contents

Interfaces

TreenodeMatcher
Interface for matching nodes in the treenode

Properties

$check_path  : mixed
$curr_depth  : mixed

Methods

__construct()  : mixed
Constructor
ascend()  : mixed
Called after children have been processed
descend()  : bool
Returns true if the children of the specified node should be searched, false otherwise.
match()  : bool
Does the match

Properties

Methods

__construct()

Constructor

public __construct(string $path) : mixed
Parameters
$path : string

The path to search

descend()

Returns true if the children of the specified node should be searched, false otherwise.

public descend(Treenode $node) : bool
Parameters
$node : Treenode

The treenode which is about to be descended into

Return values
bool —

True descending should proceed, false otherwise

match()

Does the match

public match(Treenode $node) : bool
Parameters
$node : Treenode

The treenode to do matching against

Return values
bool —

True if the node matches, false otherwise

On this page

Search results