ArangoDB-PHP API Documentation
  • Namespace
  • Class
  • Deprecated

Namespaces

  • triagens
    • ArangoDb

Classes

  • AdminHandler
  • AqlUserFunction
  • Autoloader
  • Batch
  • BatchPart
  • BindVars
  • Collection
  • CollectionHandler
  • Connection
  • ConnectionOptions
  • Cursor
  • Database
  • DefaultValues
  • Document
  • DocumentHandler
  • Edge
  • EdgeDefinition
  • EdgeHandler
  • Endpoint
  • Export
  • ExportCursor
  • Graph
  • GraphHandler
  • Handler
  • HttpHelper
  • HttpResponse
  • QueryCacheHandler
  • QueryHandler
  • Statement
  • TraceRequest
  • TraceResponse
  • Transaction
  • Traversal
  • UpdatePolicy
  • UrlHelper
  • Urls
  • User
  • UserHandler
  • ValueValidator
  • Vertex
  • VertexHandler

Exceptions

  • ClientException
  • ConnectException
  • Exception
  • ServerException

Class Traversal

Provides graph traversal

A Traversal object is used to execute a graph traversal on the server side.

The object requires the connection object, the startVertex, the edgeCollection and the optional parameters.

Namespace: triagens\ArangoDb
Package: triagens\ArangoDb
Since: 1.4
Link: https://docs.arangodb.com/HTTP/Traversal/index.html
Located at Traversal.php

Methods summary

public
# __construct( triagens\ArangoDb\Connection $connection, string $startVertex, string $edgeCollection, array $options = null )

Initialise the Traversal object

Initialise the Traversal object

Parameters

$connection
  • the connection to be used
$startVertex
  • user function initialization data
$edgeCollection
  • user function initialization data
$options

Throws

triagens\ArangoDb\ClientException
public array
# getResult( )

Execute and get the traversal result

Execute and get the traversal result

Returns

array
$responseArray

Throws

triagens\ArangoDb\Exception
triagens\ArangoDb\ClientException
protected triagens\ArangoDb\Connection
# getConnection( )

Return the connection object

Return the connection object

Returns

triagens\ArangoDb\Connection
  • the connection object
public
# setStartVertex( string $value )

Set name of the user function. It must have at least one namespace, but also can have sub-namespaces. correct: 'myNamespace:myFunction' 'myRootNamespace:mySubNamespace:myFunction'

Set name of the user function. It must have at least one namespace, but also can have sub-namespaces. correct: 'myNamespace:myFunction' 'myRootNamespace:mySubNamespace:myFunction'

wrong: 'myFunction'

Parameters

$value

Throws

triagens\ArangoDb\ClientException
public string
# getStartVertex( )

Get name value

Get name value

Returns

string
name
public
# setEdgeCollection( string $value )

Set user function code

Set user function code

Parameters

$value

Throws

triagens\ArangoDb\ClientException
public string
# getEdgeCollection( )

Get user function code

Get user function code

Returns

string
name
public
# set( $key, $value )

Set an attribute

Set an attribute

Parameters

$key
$value

Throws

triagens\ArangoDb\ClientException
public
# __set( string $key, mixed $value )

Set an attribute, magic method

Set an attribute, magic method

This is a magic method that allows the object to be used without declaring all attributes first.

Parameters

$key
  • attribute name
$value
  • value for attribute

Throws

triagens\ArangoDb\ClientException

Magic

public mixed
# get( string $key )

Get an attribute

Get an attribute

Parameters

$key
  • name of attribute

Returns

mixed
  • value of attribute, NULL if attribute is not set

Magic

public mixed
# __get( string $key )

Get an attribute, magic method

Get an attribute, magic method

This function is mapped to get() internally.

Parameters

$key
  • name of attribute

Returns

mixed
  • value of attribute, NULL if attribute is not set

Magic

public boolean
# __isset( string $key )

Is triggered by calling isset() or empty() on inaccessible properties.

Is triggered by calling isset() or empty() on inaccessible properties.

Parameters

$key
  • name of attribute

Returns

boolean
returns true or false (set or not set)
public string
# __toString( )

Returns the action string

Returns the action string

Returns

string
  • the current action string

Magic

Constants summary

string OPTION_FIELDS

count fields

count fields

# 'fields'
string ENTRY_STARTVERTEX

Collections index

Collections index

# 'startVertex'
string ENTRY_EDGECOLLECTION

Action index

Action index

# 'edgeCollection'

Properties summary

protected array $attributes

The traversal's attributes.

The traversal's attributes.

# []
protected $_action

string The action property of the traversal.

string The action property of the traversal.

#
ArangoDB-PHP API Documentation API documentation generated by ApiGen