Location: PHPKode > projects > ArangoDB-PHP > ArangoDB-PHP-1.0.1/docs/classes/triagens.ArangoDb.EdgeHandler.html
<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>ArangoDB PHP client API » \triagens\ArangoDb\EdgeHandler</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">ArangoDB PHP client API</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Namespaces</a></li>
<li><a href="../namespaces/triagens.html"><i class="icon-th"></i> triagens</a></li>
<li><a>Packages</a></li>
<li><a href="../packages/ArangoDbPhpClient.html"><i class="icon-folder-open"></i> ArangoDbPhpClient</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">0</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">9</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods
                    <ul>
<li class="method public inherited"><a href="#method___construct" title="__construct :: Construct a new handler"><span class="description">Construct a new handler</span><pre>__construct()</pre></a></li>
<li class="method public inherited"><a href="#method_delete" title="delete :: Delete a document from a collection, identified by the document itself"><span class="description">Delete a document from a collection, identified by the document itself</span><pre>delete()</pre></a></li>
<li class="method public inherited"><a href="#method_deleteById" title="deleteById :: Delete a document from a collection, identified by the collection id and document id"><span class="description">Delete a document from a collection, identified by the collection id and document id</span><pre>deleteById()</pre></a></li>
<li class="method public "><a href="#method_edges" title="edges :: Get edges for a given vertex"><span class="description">Get edges for a given vertex</span><pre>edges()</pre></a></li>
<li class="method public inherited"><a href="#method_get" title="get :: Get a single document from a collection"><span class="description">Get a single document from a collection</span><pre>get()</pre></a></li>
<li class="method public inherited"><a href="#method_getAllIds" title="getAllIds :: Get the list of all documents' ids from a collection"><span class="description">Get the list of all documents' ids from a collection</span><pre>getAllIds()</pre></a></li>
<li class="method public inherited"><a href="#method_getByExample" title="getByExample :: Get document(s) by specifying an example"><span class="description">Get document(s) by specifying an example</span><pre>getByExample()</pre></a></li>
<li class="method public inherited"><a href="#method_getById" title="getById :: Get a single document from a collection"><span class="description">Get a single document from a collection</span><pre>getById()</pre></a></li>
<li class="method public "><a href="#method_inEdges" title="inEdges :: Get inbound edges for a given vertex"><span class="description">Get inbound edges for a given vertex</span><pre>inEdges()</pre></a></li>
<li class="method public "><a href="#method_outEdges" title="outEdges :: Get outbound edges for a given vertex"><span class="description">Get outbound edges for a given vertex</span><pre>outEdges()</pre></a></li>
<li class="method public inherited"><a href="#method_remove" title="remove :: Remove a document from a collection, identified by the document itself"><span class="description">Remove a document from a collection, identified by the document itself</span><pre>remove()</pre></a></li>
<li class="method public inherited"><a href="#method_removeById" title="removeById :: Remove a document from a collection, identified by the collection id and document id"><span class="description">Remove a document from a collection, identified by the collection id and document id</span><pre>removeById()</pre></a></li>
<li class="method public inherited"><a href="#method_replace" title="replace :: Replace an existing document in a collection, identified by the document itself"><span class="description">Replace an existing document in a collection, identified by the document itself</span><pre>replace()</pre></a></li>
<li class="method public inherited"><a href="#method_replaceById" title="replaceById :: Replace an existing document in a collection, identified by collection id and document id"><span class="description">Replace an existing document in a collection, identified by collection id and document id</span><pre>replaceById()</pre></a></li>
<li class="method public "><a href="#method_saveEdge" title="saveEdge :: save an edge to an edge-collection"><span class="description">save an edge to an edge-collection</span><pre>saveEdge()</pre></a></li>
<li class="method public inherited"><a href="#method_update" title="update :: Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document."><span class="description">Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.</span><pre>update()</pre></a></li>
<li class="method public inherited"><a href="#method_updateById" title="updateById :: Update an existing document in a collection, identified by collection id and document id
Attention - The behavior of this method has changed since version 1.1"><span class="description">Update an existing document in a collection, identified by collection id and document id
Attention - The behavior of this method has changed since version 1.1</span><pre>updateById()</pre></a></li>
</ul>
</li>
<li class="nav-header protected">» Protected
                    <ul><li class="method protected inherited"><a href="#method_getConnection" title="getConnection :: Return the connection object"><span class="description">Return the connection object</span><pre>getConnection()</pre></a></li></ul>
</li>
<li class="nav-header private">» Private
                    <ul>
<li class="method private inherited"><a href="#method_getCollectionId" title="getCollectionId :: Helper function to get a collection id from a document"><span class="description">Helper function to get a collection id from a document</span><pre>getCollectionId()</pre></a></li>
<li class="method private inherited"><a href="#method_getDocumentId" title="getDocumentId :: Helper function to get a document id from a document or a document id value"><span class="description">Helper function to get a document id from a document or a document id value</span><pre>getDocumentId()</pre></a></li>
<li class="method private inherited"><a href="#method_getRevision" title="getRevision :: Helper function to get a document id from a document or a document id value"><span class="description">Helper function to get a document id from a document or a document id value</span><pre>getRevision()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties
                    <ul></ul>
</li>
<li class="nav-header private">» Private
                    <ul><li class="property private inherited"><a href="#property__connection" title="$_connection :: Connection object"><span class="description">Connection object</span><pre>$_connection</pre></a></li></ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-constant"></i> Constants
                    <ul>
<li class="constant  "><a href="#constant_ENTRY_DOCUMENTS" title="ENTRY_DOCUMENTS :: documents array index"><span class="description">documents array index</span><pre>ENTRY_DOCUMENTS</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_COLLECTION" title="OPTION_COLLECTION :: collection parameter"><span class="description">collection parameter</span><pre>OPTION_COLLECTION</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_DIRECTION" title="OPTION_DIRECTION :: direction parameter"><span class="description">direction parameter</span><pre>OPTION_DIRECTION</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_EXAMPLE" title="OPTION_EXAMPLE :: example parameter"><span class="description">example parameter</span><pre>OPTION_EXAMPLE</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_FROM" title="OPTION_FROM :: example parameter"><span class="description">example parameter</span><pre>OPTION_FROM</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_TO" title="OPTION_TO :: example parameter"><span class="description">example parameter</span><pre>OPTION_TO</pre></a></li>
<li class="constant  "><a href="#constant_OPTION_VERTEX" title="OPTION_VERTEX :: vertex parameter"><span class="description">vertex parameter</span><pre>OPTION_VERTEX</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\triagens\ArangoDb\EdgeHandler"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/triagens.html">triagens</a></li>
<li>
<span class="divider">\</span><a href="../namespaces/triagens.ArangoDb.html">ArangoDb</a>
</li>
<li class="active">
<span class="divider">\</span><a href="../classes/triagens.ArangoDb.EdgeHandler.html">EdgeHandler</a>
</li>
</ul>
<div class="element class">
<p class="short_description">An edge-document handler that fetches edges from the server and
persists them on the server.</p>
<div class="details">
<div class="long_description"><p>It does so by issuing the
appropriate HTTP requests to the server.</p></div>
<table class="table table-bordered"><tr>
<th>package</th>
<td><a href="../packages/ArangoDbPhpClient.html">ArangoDbPhpClient</a></td>
</tr></table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a id="method___construct"></a><div class="element clickable method public method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
<h2>Construct a new handler</h2>
<pre>__construct(\triagens\ArangoDb\Connection $connection) : void</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\Handler::__construct()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::__construct()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$connection</h4>
<code><a href="../classes/triagens.ArangoDb.Connection.html">\triagens\ArangoDb\Connection</a></code><ul>
<li>connection to be used</li>
</ul>
</div>
</div></div>
</div>
<a id="method_delete"></a><div class="element clickable method public method_delete" data-toggle="collapse" data-target=".method_delete .collapse">
<h2>Delete a document from a collection, identified by the document itself</h2>
<pre>delete(\triagens\ArangoDb\Document $document, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::delete()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>document to be updated</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_deleteById"></a><div class="element clickable method public method_deleteById" data-toggle="collapse" data-target=".method_deleteById .collapse">
<h2>Delete a document from a collection, identified by the collection id and document id</h2>
<pre>deleteById(mixed $collectionId, mixed $documentId, mixed $revision, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::deleteById()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$revision</h4>
<code>mixed</code><ul>
<li>optional revision of the document to be deleted</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_edges"></a><div class="element clickable method public method_edges" data-toggle="collapse" data-target=".method_edges .collapse">
<h2>Get edges for a given vertex</h2>
<pre>edges(mixed $collectionId, mixed $vertexHandle, string $direction) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>1.0</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>edge-collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$vertexHandle</h4>
<code>mixed</code><ul>
<li>the vertex involved</li>
</ul>
</div>
<div class="subelement argument">
<h4>$direction</h4>
<code>string</code><ul>
<li>optional defaults to 'any'. Other possible Values 'in' & 'out'</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>- array of cursors</div>
</div></div>
</div>
<a id="method_get"></a><div class="element clickable method public method_get" data-toggle="collapse" data-target=".method_get .collapse">
<h2>Get a single document from a collection</h2>
<pre>get(mixed $collectionId, mixed $documentId, array $options) : <a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Alias method for getById()</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::get()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as a string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document identifier</li>
</ul>
</div>
<div class="subelement argument">
<h4>$options</h4>
<code>array</code><ul>
<li>optional, array of options </li>
</ul>

<p>Options are : <li>'includeInternals' - true to include the internal attributes. Defaults to false</li> <li>'ignoreHiddenAttributes' - true to show hidden attributes. Defaults to false</li> </p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code>- the document fetched from the server</div>
</div></div>
</div>
<a id="method_getAllIds"></a><div class="element clickable method public method_getAllIds" data-toggle="collapse" data-target=".method_getAllIds .collapse">
<h2>Get the list of all documents' ids from a collection</h2>
<pre>getAllIds(mixed $collectionId) : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will throw if the list cannot be fetched from the server</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getAllIds()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>- ids of documents in the collection</div>
</div></div>
</div>
<a id="method_getByExample"></a><div class="element clickable method public method_getByExample" data-toggle="collapse" data-target=".method_getByExample .collapse">
<h2>Get document(s) by specifying an example</h2>
<pre>getByExample(mixed $collectionId, mixed $document, bool $sanitize) : array</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will throw if the list cannot be fetched from the server</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getByExample()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$document</h4>
<code>mixed</code><ul>
<li>the example document as a Document object or an array</li>
</ul>
</div>
<div class="subelement argument">
<h4>$sanitize</h4>
<code>bool</code><ul>
<li>remove _id and _rev attributes from result documents</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>- documents matching the example [0...n]</div>
</div></div>
</div>
<a id="method_getById"></a><div class="element clickable method public method_getById" data-toggle="collapse" data-target=".method_getById .collapse">
<h2>Get a single document from a collection</h2>
<pre>getById(mixed $collectionId, mixed $documentId, array $options) : <a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will throw if the document cannot be fetched from the server</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getById()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as a string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document identifier</li>
</ul>
</div>
<div class="subelement argument">
<h4>$options</h4>
<code>array</code><ul>
<li>optional, array of options </li>
</ul>

<p>Options are : <li>'includeInternals' - true to include the internal attributes. Defaults to false</li> <li>'ignoreHiddenAttributes' - true to show hidden attributes. Defaults to false</li> </p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code>- the document fetched from the server</div>
</div></div>
</div>
<a id="method_inEdges"></a><div class="element clickable method public method_inEdges" data-toggle="collapse" data-target=".method_inEdges .collapse">
<h2>Get inbound edges for a given vertex</h2>
<pre>inEdges(mixed $collectionId, mixed $vertexHandle) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>edge-collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$vertexHandle</h4>
<code>mixed</code><ul>
<li>the vertex involved</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>- array of cursors</div>
</div></div>
</div>
<a id="method_outEdges"></a><div class="element clickable method public method_outEdges" data-toggle="collapse" data-target=".method_outEdges .collapse">
<h2>Get outbound edges for a given vertex</h2>
<pre>outEdges(mixed $collectionId, mixed $vertexHandle) : array</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>edge-collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$vertexHandle</h4>
<code>mixed</code><ul>
<li>the vertex involved</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>array</code>- array of cursors</div>
</div></div>
</div>
<a id="method_remove"></a><div class="element clickable method public method_remove" data-toggle="collapse" data-target=".method_remove .collapse">
<h2>Remove a document from a collection, identified by the document itself</h2>
<pre>remove(\triagens\ArangoDb\Document $document, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::remove()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>document to be removed</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_removeById"></a><div class="element clickable method public method_removeById" data-toggle="collapse" data-target=".method_removeById .collapse">
<h2>Remove a document from a collection, identified by the collection id and document id</h2>
<pre>removeById(mixed $collectionId, mixed $documentId, mixed $revision, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::removeById()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$revision</h4>
<code>mixed</code><ul>
<li>optional revision of the document to be deleted</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_replace"></a><div class="element clickable method public method_replace" data-toggle="collapse" data-target=".method_replace .collapse">
<h2>Replace an existing document in a collection, identified by the document itself</h2>
<pre>replace(\triagens\ArangoDb\Document $document, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will update the document on the server</p>

<p>This will throw if the document cannot be updated</p>

<p>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 document is the same as the one given.</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::replace()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>document to be updated</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>update policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_replaceById"></a><div class="element clickable method public method_replaceById" data-toggle="collapse" data-target=".method_replaceById .collapse">
<h2>Replace an existing document in a collection, identified by collection id and document id</h2>
<pre>replaceById(mixed $collectionId, mixed $documentId, \triagens\ArangoDb\Document $document, mixed $policy) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will update the document on the server</p>

<p>This will throw if the document cannot be Replaced</p>

<p>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 document is the same as the one given.</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::replaceById()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>document to be updated</li>
</ul>
</div>
<div class="subelement argument">
<h4>$policy</h4>
<code>mixed</code><ul>
<li>update policy to be used in case of conflict</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_saveEdge"></a><div class="element clickable method public method_saveEdge" data-toggle="collapse" data-target=".method_saveEdge .collapse">
<h2>save an edge to an edge-collection</h2>
<pre>saveEdge(mixed $collectionId, mixed $from, mixed $to, \triagens\ArangoDb\Document $document, bool $create) : mixed</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will save the edge to the collection and return the edges-document's id</p>

<p>This will throw if the document cannot be saved</p></div>
<table class="table table-bordered"><tr>
<th>since</th>
<td>1.0</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$from</h4>
<code>mixed</code><ul>
<li>from vertex</li>
</ul>
</div>
<div class="subelement argument">
<h4>$to</h4>
<code>mixed</code><ul>
<li>to vertex</li>
</ul>
</div>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>the document to be added</li>
</ul>
</div>
<div class="subelement argument">
<h4>$create</h4>
<code>bool</code><ul>
<li>create the collection if it does not yet exist</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>mixed</code>- id of document created</div>
</div></div>
</div>
<a id="method_update"></a><div class="element clickable method public method_update" data-toggle="collapse" data-target=".method_update .collapse">
<h2>Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.</h2>
<pre>update(\triagens\ArangoDb\Document $document, mixed $options) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Attention - The behavior of this method has changed since version 1.1</p>

<p>This will update the document on the server</p>

<p>This will throw if the document cannot be updated</p>

<p>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 document is the same as the one given.</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::update()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>The patch document that will update the document in question</li>
</ul>
</div>
<div class="subelement argument">
<h4>$options</h4>
<code>mixed</code><ul>
<li>optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method) </li>
</ul>

<p>Options are : <li>'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])</li> <li>'keepNull' - can be used to instruct ArangoDB to delete existing attributes instead setting their values to null. Defaults to true (keep attributes when set to null)</li> </p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_updateById"></a><div class="element clickable method public method_updateById" data-toggle="collapse" data-target=".method_updateById .collapse">
<h2>Update an existing document in a collection, identified by collection id and document id
Attention - The behavior of this method has changed since version 1.1</h2>
<pre>updateById(mixed $collectionId, mixed $documentId, \triagens\ArangoDb\Document $document, mixed $options) : bool</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This will update the document on the server</p>

<p>This will throw if the document cannot be updated</p>

<p>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 document is the same as the one given.</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::updateById()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$collectionId</h4>
<code>mixed</code><ul>
<li>collection id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$documentId</h4>
<code>mixed</code><ul>
<li>document id as string or number</li>
</ul>
</div>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>patch document which contains the attributes and values to be updated</li>
</ul>
</div>
<div class="subelement argument">
<h4>$options</h4>
<code>mixed</code><ul>
<li>optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method) </li>
</ul>

<p>Options are : <li>'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])</li> <li>'keepNull' - can be used to instruct ArangoDB to delete existing attributes instead setting their values to null. Defaults to true (keep attributes when set to null)</li> </p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.Exception.html">\triagens\ArangoDb\Exception</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>bool</code>- always true, will throw if there is an error</div>
</div></div>
</div>
<a id="method_getConnection"></a><div class="element clickable method protected method_getConnection" data-toggle="collapse" data-target=".method_getConnection .collapse">
<h2>Return the connection object</h2>
<pre>getConnection() : <a href="../classes/triagens.ArangoDb.Connection.html">\triagens\ArangoDb\Connection</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\Handler::getConnection()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getConnection()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/triagens.ArangoDb.Connection.html">\triagens\ArangoDb\Connection</a></code>- the connection object</div>
</div></div>
</div>
<a id="method_getCollectionId"></a><div class="element clickable method private method_getCollectionId" data-toggle="collapse" data-target=".method_getCollectionId .collapse">
<h2>Helper function to get a collection id from a document</h2>
<pre>getCollectionId(\triagens\ArangoDb\Document $document) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getCollectionId()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code><a href="../classes/triagens.ArangoDb.Document.html">\triagens\ArangoDb\Document</a></code><ul>
<li>document id</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.ClientException.html">\triagens\ArangoDb\ClientException</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>mixed</code>- collection id, will throw if there is an error</div>
</div></div>
</div>
<a id="method_getDocumentId"></a><div class="element clickable method private method_getDocumentId" data-toggle="collapse" data-target=".method_getDocumentId .collapse">
<h2>Helper function to get a document id from a document or a document id value</h2>
<pre>getDocumentId(mixed $document) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getDocumentId()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code>mixed</code><ul>
<li>document id OR document to be updated</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.ClientException.html">\triagens\ArangoDb\ClientException</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>mixed</code>- document id, will throw if there is an error</div>
</div></div>
</div>
<a id="method_getRevision"></a><div class="element clickable method private method_getRevision" data-toggle="collapse" data-target=".method_getRevision .collapse">
<h2>Helper function to get a document id from a document or a document id value</h2>
<pre>getRevision(mixed $document) : mixed</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::getRevision()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$document</h4>
<code>mixed</code><ul>
<li>document id OR document to be updated</li>
</ul>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/triagens.ArangoDb.ClientException.html">\triagens\ArangoDb\ClientException</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response">
<code>mixed</code>- document id, will throw if there is an error</div>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a id="property__connection"> </a><div class="element clickable property private property__connection" data-toggle="collapse" data-target=".property__connection .collapse">
<h2>Connection object</h2>
<pre>$_connection </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>param</th>
<td><p>Connection</p></td>
</tr>
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\Handler::$$_connection</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\triagens\ArangoDb\DocumentHandler::$$_connection</td>
</tr>
</table>
</div></div>
</div>
<h3>
<i class="icon-custom icon-constant"></i> Constants</h3>
<a id="constant_ENTRY_DOCUMENTS"> </a><div class="element clickable constant  constant_ENTRY_DOCUMENTS" data-toggle="collapse" data-target=".constant_ENTRY_DOCUMENTS .collapse">
<h2>documents array index</h2>
<pre>ENTRY_DOCUMENTS </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_COLLECTION"> </a><div class="element clickable constant  constant_OPTION_COLLECTION" data-toggle="collapse" data-target=".constant_OPTION_COLLECTION .collapse">
<h2>collection parameter</h2>
<pre>OPTION_COLLECTION </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_DIRECTION"> </a><div class="element clickable constant  constant_OPTION_DIRECTION" data-toggle="collapse" data-target=".constant_OPTION_DIRECTION .collapse">
<h2>direction parameter</h2>
<pre>OPTION_DIRECTION </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_EXAMPLE"> </a><div class="element clickable constant  constant_OPTION_EXAMPLE" data-toggle="collapse" data-target=".constant_OPTION_EXAMPLE .collapse">
<h2>example parameter</h2>
<pre>OPTION_EXAMPLE </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_FROM"> </a><div class="element clickable constant  constant_OPTION_FROM" data-toggle="collapse" data-target=".constant_OPTION_FROM .collapse">
<h2>example parameter</h2>
<pre>OPTION_FROM </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_TO"> </a><div class="element clickable constant  constant_OPTION_TO" data-toggle="collapse" data-target=".constant_OPTION_TO .collapse">
<h2>example parameter</h2>
<pre>OPTION_TO </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="constant_OPTION_VERTEX"> </a><div class="element clickable constant  constant_OPTION_VERTEX" data-toggle="collapse" data-target=".constant_OPTION_VERTEX .collapse">
<h2>vertex parameter</h2>
<pre>OPTION_VERTEX </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a10</a> and<br>
            generated on 2012-12-05T20:49:15+02:00.<br></footer></div>
</div>
</body>
</html>
Return current item: ArangoDB-PHP