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 EdgeHandler

A handler that manages edges

An edge-document handler that fetches edges from the server and persists them on the server. It does so by issuing the appropriate HTTP requests to the server.

triagens\ArangoDb\Handler
Extended by triagens\ArangoDb\DocumentHandler
Extended by triagens\ArangoDb\EdgeHandler
Namespace: triagens\ArangoDb
Package: triagens\ArangoDb
Since: 1.0
Located at EdgeHandler.php

Methods summary

public triagens\ArangoDb\Edge
# createFromArrayWithContext( $data, $options )

Intermediate function to call the createFromArray function from the right context

Intermediate function to call the createFromArray function from the right context

Parameters

$data
$options

Returns

triagens\ArangoDb\Edge

Throws

triagens\ArangoDb\ClientException

Overrides

triagens\ArangoDb\DocumentHandler::createFromArrayWithContext
public mixed
# saveEdge( mixed $collection, mixed $from, mixed $to, mixed $document, array $options = [] )

save an edge to an edge-collection

save an edge to an edge-collection

This will save the edge to the collection and return the edges-document's id

This will throw if the document cannot be saved

Parameters

$collection
  • collection id as string or number
$from
  • from vertex
$to
  • to vertex
$document
  • the edge-document to be added, can be passed as an object or an array
$options
  • optional, array of options.

Options are :

  • 'createCollection' - create the collection if it does not yet exist.
  • 'waitForSync' - if set to true, then all removal operations will instantly be synchronised to disk.
    If this is not specified, then the collection's default sync behavior will be applied.
  • Returns

    mixed
    • id of document created

    Throws

    triagens\ArangoDb\Exception

    Since

    1.0
    public array
    # edges( mixed $collection, mixed $vertexHandle, string $direction = 'any', array $options = [] )

    Get connected edges for a given vertex

    Get connected edges for a given vertex

    Parameters

    $collection
    • edge-collection id as string or number
    $vertexHandle
    • the vertex involved
    $direction
    • optional defaults to 'any'. Other possible Values 'in' & 'out'
    $options
    • optional, array of options

    Options are :

  • '_includeInternals' - true to include the internal attributes. Defaults to false
  • '_ignoreHiddenAttributes' - true to show hidden attributes. Defaults to false
  • Returns

    array
    • array of connected edges

    Throws

    triagens\ArangoDb\Exception

    Since

    1.0
    public array
    # inEdges( mixed $collection, mixed $vertexHandle )

    Get connected inbound edges for a given vertex

    Get connected inbound edges for a given vertex

    Parameters

    $collection
    • edge-collection id as string or number
    $vertexHandle
    • the vertex involved

    Returns

    array
    • array of connected edges

    Throws

    triagens\ArangoDb\Exception
    public array
    # outEdges( mixed $collection, mixed $vertexHandle )

    Get connected outbound edges for a given vertex

    Get connected outbound edges for a given vertex

    Parameters

    $collection
    • edge-collection id as string or number
    $vertexHandle
    • the vertex involved

    Returns

    array
    • array of connected edges

    Throws

    triagens\ArangoDb\Exception
    protected
    # createCollectionIfOptions( $collection, array $options )

    Parameters

    $collection
    collection name or id
    $options
    • optional, array of options

    Options are :

  • 'createCollection' - true to create the collection if it does not exist
  • 'createCollectionType' - "document" or 2 for document collection
  • "edge" or 3 for edge collection
  • Overrides

    triagens\ArangoDb\DocumentHandler::createCollectionIfOptions

    Methods inherited from triagens\ArangoDb\DocumentHandler

    get(), getById(), getHead(), has(), remove(), removeById(), replace(), replaceById(), save(), store(), update(), updateById()

    Methods inherited from triagens\ArangoDb\Handler

    __construct(), getConnection(), getConnectionOption(), includeOptionsInBody(), includeOptionsInParams(), json_encode_wrapper(), makeCollection()

    Constants summary

    string ENTRY_EDGES

    edges array index

    edges array index

    # 'edges'
    string OPTION_FROM

    example parameter

    example parameter

    # 'from'
    string OPTION_TO

    example parameter

    example parameter

    # 'to'
    string OPTION_VERTEX

    vertex parameter

    vertex parameter

    # 'vertex'
    string OPTION_DIRECTION

    direction parameter

    direction parameter

    # 'direction'

    Constants inherited from triagens\ArangoDb\DocumentHandler

    ENTRY_DOCUMENTS, OPTION_COLLECTION, OPTION_EXAMPLE

    ArangoDB-PHP API Documentation API documentation generated by ApiGen