ENTRY_GRAPH
ENTRY_GRAPH
documents array index
A handler that manages graphs.
__construct(\triagens\ArangoDb\Connection $connection) : \triagens\ArangoDb\Handler
Construct a new handler
\triagens\ArangoDb\Connection | $connection |
|
createGraph(\triagens\ArangoDb\Graph $graph) : array
Create a graph
This will create a graph using the given graph object and return an array of the created graph object's attributes.
\triagens\ArangoDb\Graph | $graph |
|
getGraph(String $graph, array $options) : \triagens\ArangoDb\Graph
Get a graph
This will get a graph.
String | $graph |
|
array | $options |
|
dropGraph(mixed $graph, boolean $dropCollections) : boolean
Drop a graph and remove all its vertices and edges, also drops vertex and edge collections<br><br>
mixed | $graph |
|
boolean | $dropCollections |
|
addOrphanCollection(mixed $graph, string $orphanCollection) : \triagens\ArangoDb\Graph
add an orphan collection to the graph.
This will add a further orphan collection to the graph.
mixed | $graph |
|
string | $orphanCollection |
|
deleteOrphanCollection(mixed $graph, string $orphanCollection, boolean $dropCollection) : \triagens\ArangoDb\Graph
deletes an orphan collection from the graph.
This will delete an orphan collection from the graph.
mixed | $graph |
|
string | $orphanCollection |
|
boolean | $dropCollection |
|
getVertexCollections(mixed $graph) : array
gets all vertex collection from the graph.
This will get all vertex collection (orphans and used in edge definitions) from the graph.
mixed | $graph |
|
addEdgeDefinition(mixed $graph, \triagens\ArangoDb\EdgeDefinition $edgeDefinition) : \triagens\ArangoDb\Graph
adds an edge definition to the graph.
This will add a further edge definition to the graph.
mixed | $graph |
|
\triagens\ArangoDb\EdgeDefinition | $edgeDefinition |
|
deleteEdgeDefinition(mixed $graph, string $edgeDefinition, boolean $dropCollection) : \triagens\ArangoDb\Graph
deletes an edge definition from the graph.
This will delete an edge definition from the graph.
mixed | $graph |
|
string | $edgeDefinition |
|
boolean | $dropCollection |
|
getEdgeCollections(mixed $graph) : \triagens\ArangoDb\array()
gets all edge collections from the graph.
This will get all edge collections from the graph.
mixed | $graph |
|
replaceEdgeDefinition(mixed $graph, \triagens\ArangoDb\EdgeDefinition $edgeDefinition) : \triagens\ArangoDb\Graph
replaces an edge definition of the graph.
This will replace an edge definition in the graph.
mixed | $graph |
|
\triagens\ArangoDb\EdgeDefinition | $edgeDefinition |
|
saveVertex(mixed $graph, mixed $document, string $collection) : string
save a vertex to a graph
This will add the vertex-document to the graph and return the vertex id
This will throw if the vertex cannot be saved
mixed | $graph |
|
mixed | $document |
|
string | $collection |
|
getVertex(mixed $graph, mixed $vertexId, array $options, string $collection) : \triagens\ArangoDb\Document
Get a single vertex from a graph
This will throw if the vertex cannot be fetched from the server
mixed | $graph |
|
mixed | $vertexId |
|
array | $options | optional, an array of options:
|
string | $collection |
|
replaceVertex(mixed $graph, mixed $vertexId, \triagens\ArangoDb\Document $document, mixed $options, string $collection) : boolean
Replace an existing vertex in a graph, identified graph name and vertex id
This will update the vertex on the server
If policy is set to error (locally or globally through the ConnectionOptions)
and the passed document has a _rev value set, the database will check
that the revision of the to-be-replaced vertex is the same as the one given.
mixed | $graph |
|
mixed | $vertexId |
|
\triagens\ArangoDb\Document | $document |
|
mixed | $options | optional, an array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method):
|
string | $collection |
|
updateVertex(mixed $graph, mixed $vertexId, \triagens\ArangoDb\Document $document, mixed $options, string $collection) : boolean
Update an existing vertex in a graph, identified by graph name and vertex id
This will update the vertex on the server
This will throw if the vertex cannot be updated
If policy is set to error (locally or globally through the ConnectionOptions)
and the passed vertex-document has a _rev value set, the database will check
that the revision of the to-be-replaced document is the same as the one given.
mixed | $graph |
|
mixed | $vertexId |
|
\triagens\ArangoDb\Document | $document |
|
mixed | $options | optional, an array of options (see below)
|
string | $collection |
|
removeVertex(mixed $graph, mixed $vertexId, mixed $revision, mixed $options, string $collection) : boolean
Remove a vertex from a graph, identified by the graph name and vertex id<br><br>
mixed | $graph |
|
mixed | $vertexId |
|
mixed | $revision |
|
mixed | $options | optional, an array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method)
|
string | $collection |
|
saveEdge(mixed $graph, mixed $from, mixed $to, mixed $label, mixed $document, string $collection) : mixed
save an edge to a graph
This will save the edge to the graph and return the edges-document's id
This will throw if the edge cannot be saved
mixed | $graph |
|
mixed | $from |
|
mixed | $to |
|
mixed | $label |
|
mixed | $document |
|
string | $collection |
|
getEdge(mixed $graph, mixed $edgeId, array $options, string $collection) : \triagens\ArangoDb\Document
Get a single edge from a graph
This will throw if the edge cannot be fetched from the server
mixed | $graph |
|
mixed | $edgeId |
|
array | $options | optional, array of options
|
string | $collection |
|
replaceEdge(mixed $graph, mixed $edgeId, mixed $label, \triagens\ArangoDb\Edge $document, mixed $options, string $collection) : boolean
Replace an existing edge in a graph, identified graph name and edge id
This will replace the edge on the server
This will throw if the edge cannot be Replaced
If policy is set to error (locally or globally through the ConnectionOptions)
and the passed document has a _rev value set, the database will check
that the revision of the to-be-replaced edge is the same as the one given.
mixed | $graph |
|
mixed | $edgeId |
|
mixed | $label |
|
\triagens\ArangoDb\Edge | $document |
|
mixed | $options | optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method)
|
string | $collection |
|
updateEdge(mixed $graph, mixed $edgeId, mixed $label, \triagens\ArangoDb\Edge $document, mixed $options, string $collection) : boolean
Update an existing edge in a graph, identified by graph name and edge id
This will update the edge on the server
This will throw if the edge cannot be updated
If policy is set to error (locally or globally through the ConnectionOptions)
and the passed edge-document has a _rev value set, the database will check
that the revision of the to-be-replaced document is the same as the one given.
mixed | $graph |
|
mixed | $edgeId |
|
mixed | $label |
|
\triagens\ArangoDb\Edge | $document |
|
mixed | $options | optional, array of options (see below)
|
string | $collection |
|
removeEdge(mixed $graph, mixed $edgeId, mixed $revision, mixed $options, string $collection) : boolean
Remove a edge from a graph, identified by the graph name and edge id<br><br>
mixed | $graph |
|
mixed | $edgeId |
|
mixed | $revision |
|
mixed | $options | optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method)
|
string | $collection |
|
getNeighborVertices(mixed $graph, mixed $vertexExample, boolean|array $options) : \triagens\ArangoDb\Cursor
Get neighboring vertices of a given vertex
This method accepts multiple argument types for the vertex examples, these can be:
mixed | $graph |
|
mixed | $vertexExample |
|
boolean|array | $options | an array of optional parameters:
The difference is, that if you're returning a resultset of documents, the getAll() is already called and the hidden attributes would not be applied to the attributes. |
getConnectedEdges(mixed $graph, mixed $vertexId, boolean|array $options) : \triagens\ArangoDb\Cursor
Get connected edges of a given vertex
This will throw if the list cannot be fetched from the server
mixed | $graph |
|
mixed | $vertexId |
|
boolean|array | $options |
|
getVertices(mixed $graph, boolean|array $options) : \triagens\ArangoDb\Cursor
Get all vertices of a graph
This will throw if the list cannot be fetched from the server
mixed | $graph |
|
boolean|array | $options |
|
getEdges(mixed $graph, boolean|array $options) : \triagens\ArangoDb\Cursor
Get edges of a graph
This will throw if the list cannot be fetched from the server
mixed | $graph |
|
boolean|array | $options |
|
getPaths(mixed $graph, boolean|array $options) : \triagens\ArangoDb\Cursor
Get all pathes of a graph
This will throw if the list cannot be fetched from the server
mixed | $graph |
|
boolean|array | $options |
|
getShortestPaths(mixed $graph, mixed $startVertexExample, mixed $endVertexExample, boolean|array $options) : \triagens\ArangoDb\Cursor
Get the shortest pathes of a graph
This will throw if the list cannot be fetched from the server This method accepts multiple argument types for the vertex examples, these can be:
mixed | $graph |
|
mixed | $startVertexExample |
|
mixed | $endVertexExample |
|
boolean|array | $options |
|
getDistanceTo(mixed $graph, mixed $startVertexExample, mixed $endVertexExample, boolean|array $options) : \triagens\ArangoDb\Cursor
Gets the distance of vertex pairs of a graph
This will throw if the list cannot be fetched from the server
mixed | $graph |
|
mixed | $startVertexExample |
|
mixed | $endVertexExample |
|
boolean|array | $options |
|
getCommonNeighborVertices(mixed $graph, mixed $vertex1Example, mixed $vertex2Example, array $options1, array $options2) : \triagens\ArangoDb\Cursor
Get common neighboring vertices of 2 gicen vertices.
This will throw if the list cannot be fetched from the server
This method returns the intersection of the result of 'getNeighborVertices.'
This method accepts a different set of options than 'getNeighborVertices.'
mixed | $graph |
|
mixed | $vertex1Example |
|
mixed | $vertex2Example |
|
array | $options1 |
|
array | $options2 |
|
getCommonProperties(mixed $graph, mixed $vertex1Example, mixed $vertex2Example, array $options) : \triagens\ArangoDb\Cursor
Get vertices with common properties.
This will throw if the list cannot be fetched from the server
This method accepts multiple argument types for the vertex examples, these can be:
mixed | $graph |
|
mixed | $vertex1Example |
|
mixed | $vertex2Example |
|
array | $options |
|
getAbsoluteEccentricity(mixed $graph, mixed $vertexExample, boolean|array $options) : array
Get the absolute <a href="http://en.wikipedia.org/wiki/Distance_%28graph_theory%29">eccentricity</a> of a graph.
This will throw if the list cannot be fetched from the server This does not support 'batchsize', 'limit' and 'count'. This method accepts multiple argument types for the vertex examples, these can be:
mixed | $graph |
|
mixed | $vertexExample |
|
boolean|array | $options |
|
getEccentricity(mixed $graph, boolean|array $options) : array
Get the <a href="http://en.wikipedia.org/wiki/Distance_%28graph_theory%29">eccentricity</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getAbsoluteCloseness(mixed $graph, mixed $vertexExample, boolean|array $options) : array
Get the absolute <a href="http://en.wikipedia.org/wiki/Centrality#Closeness_centrality">closeness</a> of a graph.
This will throw if the list cannot be fetched from the server This does not support 'batchsize', 'limit' and 'count'. This method accepts multiple argument types for the vertex examples, these can be:
mixed | $graph |
|
mixed | $vertexExample |
|
boolean|array | $options |
|
getCloseness(mixed $graph, boolean|array $options) : array
Get the <a href="http://en.wikipedia.org/wiki/Centrality#Closeness_centrality">closeness</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getAbsoluteBetweenness(mixed $graph, boolean|array $options) : array
Get the absolute <a href="http://en.wikipedia.org/wiki/Betweenness_centrality">betweenness</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getBetweenness(mixed $graph, boolean|array $options) : array
Get the <a href="http://en.wikipedia.org/wiki/Betweenness_centrality">betweenness</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getRadius(mixed $graph, boolean|array $options) : double
Get the <a href="http://en.wikipedia.org/wiki/Eccentricity_%28graph_theory%29">radius</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getDiameter(mixed $graph, boolean|array $options) : double
Get the <a href="http://en.wikipedia.org/wiki/Eccentricity_%28graph_theory%29">diameter</a> of a graph.
This will throw if the list cannot be fetched from the server
This does not support 'batchsize', 'limit' and 'count'.
mixed | $graph |
|
boolean|array | $options |
|
getConnection() : \triagens\ArangoDb\Connection
Return the connection object
json_encode_wrapper(array $body) : string
Return a json encoded string for the array passed.
This is a convenience function that calls json_encode_wrapper on the connection
array | $body |
|
validateAndIncludeOldSingleParameterInParams(array $options, array $params, mixed $parameter) : array
Helper function that validates and includes an old single method parameter setting into the parameters array given.
This is only for keeping backwards-compatibility where methods had for example a parameter which was called 'policy' and which was later changed to being an array of options, so more than one options can be passed easily. This is only for options that are to be sent to the ArangoDB server.
array | $options |
|
array | $params |
|
mixed | $parameter |
|
$params - array of parameters for use in a url
includeOptionsInParams(array $options, array $params, array $includeArray) : array
Helper function that runs through the options given and includes them into the parameters array given.
Only options that are set in $includeArray will be included. This is only for options that are to be sent to the ArangoDB server in form of url parameters (like 'waitForSync', 'keepNull', etc...) .
array | $options |
|
array | $params |
|
array | $includeArray |
|
$params - array of parameters for use in a url
includeOptionsInBody(array $options, array $body, array $includeArray) : array
Helper function that runs through the options given and includes them into the parameters array given.
Only options that are set in $includeArray will be included. This is only for options that are to be sent to the ArangoDB server in a json body(like 'limit', 'skip', etc...) .
array | $options |
|
array | $body |
|
array | $includeArray |
|
$params - array of parameters for use in a url