Traversal
in package
Represents a graph traversal.
Tags
Table of Contents
Constants
- GRAPH_DIRECTION_ANY = 'ANY'
- Any graph direction.
- GRAPH_DIRECTION_INBOUND = 'INBOUND'
- Inbound graph direction.
- GRAPH_DIRECTION_OUTBOUND = 'OUTBOUND'
- Outbound graph direction.
Methods
- __construct() : mixed
- Traversal constructor.
- setConnection() : void
- Sets a connection to use for traversal.
- toAql() : string
- Returns the query,
- traversalQuery() : Traversal
- Returns a default traversal
Constants
GRAPH_DIRECTION_ANY
Any graph direction.
public
string
GRAPH_DIRECTION_ANY
= 'ANY'
GRAPH_DIRECTION_INBOUND
Inbound graph direction.
public
string
GRAPH_DIRECTION_INBOUND
= 'INBOUND'
GRAPH_DIRECTION_OUTBOUND
Outbound graph direction.
public
string
GRAPH_DIRECTION_OUTBOUND
= 'OUTBOUND'
Methods
__construct()
Traversal constructor.
public
__construct(Statement $statement[, Connection|null $connection = null ]) : mixed
Parameters
- $statement : Statement
-
AQL Statement for traversal.
- $connection : Connection|null = null
-
The connection object to use.
Tags
setConnection()
Sets a connection to use for traversal.
public
setConnection(Connection $connection) : void
Parameters
- $connection : Connection
toAql()
Returns the query,
public
toAql() : string
Tags
Return values
stringtraversalQuery()
Returns a default traversal
public
static traversalQuery(Vertex $vertex, string $graph[, string $direction = self::GRAPH_DIRECTION_ANY ][, int $depth = 0 ]) : Traversal
Parameters
- $vertex : Vertex
-
Vertex to start graph traversal.
- $graph : string
-
The graph to traverse.
- $direction : string = self::GRAPH_DIRECTION_ANY
-
Direction for traversal.
- $depth : int = 0
-
Visits only nodes in at least the given depth.
Tags
Return values
Traversal —Traversal object.