Documentation

Pathfinder
in package

Table of Contents

find()  : Traversable<string|int, mixed>|array<int, mixed>
Combines the query and an object to retrieve a list of nodes that are to be used as node-point in a template.
walkObjectTree()  : mixed
Walks an object graph and/or array using a twig query string.

Methods

find()

Combines the query and an object to retrieve a list of nodes that are to be used as node-point in a template.

public find(Traversable<string, mixed>|Descriptor $object, string $query) : Traversable<string|int, mixed>|array<int, mixed>

This method interprets the provided query string and walks through the given object to find the correct element. This method will silently fail if an invalid query was provided; in such a case the given object is returned.

Parameters
$object : Traversable<string, mixed>|Descriptor
$query : string
Return values
Traversable<string|int, mixed>|array<int, mixed>

walkObjectTree()

Walks an object graph and/or array using a twig query string.

private walkObjectTree(Traversable<string, mixed>|Descriptor $object, string $query) : mixed
Parameters
$object : Traversable<string, mixed>|Descriptor
$query : string

A path to walk separated by dots, i.e. namespace.namespaces.

Return values
mixed

Search results