Pathfinder

package

Default

Methods

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

find(object $object, string $query) : \Traversable|array<mixed,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.

Arguments

$object

object

$query

string

Response

\Traversable|array<mixed,mixed>

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

walkObjectTree(\Traversable|mixed $objectOrArray, string $query) : mixed

Arguments

$objectOrArray

\Traversable|mixed

$query

string

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

Response

mixed