From 3087b06b9cb3fb66307ad4040a435169d7d95e15 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 1 May 2013 19:13:01 +0300 Subject: [PATCH 1/5] Fixed / added doc blocks and PSR-2 formatting --- lib/triagens/ArangoDb/Collection.php | 14 ++- lib/triagens/ArangoDb/DocumentHandler.php | 21 ++-- lib/triagens/ArangoDb/Graph.php | 10 +- lib/triagens/ArangoDb/GraphHandler.php | 65 +++++++------ lib/triagens/ArangoDb/TraceRequest.php | 29 ++++-- lib/triagens/ArangoDb/TraceResponse.php | 112 ++++++++++++---------- 6 files changed, 152 insertions(+), 99 deletions(-) diff --git a/lib/triagens/ArangoDb/Collection.php b/lib/triagens/ArangoDb/Collection.php index e6d6fc76..d3e81cac 100644 --- a/lib/triagens/ArangoDb/Collection.php +++ b/lib/triagens/ArangoDb/Collection.php @@ -459,7 +459,7 @@ public function getType() * * @throws ClientException * - * @param int $keyOptions - status = 1 -> new born, status = 2 -> unloaded, status = 3 -> loaded, status = 4 -> being unloaded, status = 5 -> deleted + * @param int $status - statuses = 1 -> new born, status = 2 -> unloaded, status = 3 -> loaded, status = 4 -> being unloaded, status = 5 -> deleted * * @return void */ @@ -471,7 +471,17 @@ public function setStatus($status) throw new ClientException('Should not update the status of an existing collection'); } - if (!in_array($status, array(self::STATUS_NEW_BORN, self::STATUS_UNLOADED, self::STATUS_LOADED, self::STATUS_BEING_UNLOADED, self::STATUS_DELETED))) { + if (!in_array( + $status, + array( + self::STATUS_NEW_BORN, + self::STATUS_UNLOADED, + self::STATUS_LOADED, + self::STATUS_BEING_UNLOADED, + self::STATUS_DELETED + ) + ) + ) { throw new ClientException('Invalid status used for collection'); } diff --git a/lib/triagens/ArangoDb/DocumentHandler.php b/lib/triagens/ArangoDb/DocumentHandler.php index 2c054865..12408df7 100644 --- a/lib/triagens/ArangoDb/DocumentHandler.php +++ b/lib/triagens/ArangoDb/DocumentHandler.php @@ -90,6 +90,7 @@ public function getById($collectionId, $documentId, array $options = array()) $data = $response->getJson(); $options['_isNew'] = false; + return Document::createFromArray($data, $options); } @@ -193,9 +194,9 @@ public function add($collectionId, Document $document, $options = array()) * * @throws Exception * - * @param mixed $collectionId - collection id as string or number - * @param mixed $document - the document to be added, can be passed as a document or an array - * @param bool|array $options - optional, prior to v1.2.0 this was a boolean value for create. Since v1.0.0 it's an array of options. + * @param Document $document - the document to be added, can be passed as a document or an array + * @param mixed $collectionId - collection id as string or number + * @param bool|array $options - optional, prior to v1.2.0 this was a boolean value for create. Since v1.2.0 it's an array of options. *

Options are :
*

  • 'create' - 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.
  • @@ -206,9 +207,9 @@ public function add($collectionId, Document $document, $options = array()) */ public function store(Document $document, $collectionId = null, $options = array()) { - if($document->getIsNew()){ + if ($document->getIsNew()) { - if($collectionId == null){ + if ($collectionId == null) { throw new ClientException('A collection id is required to store a new document.'); } @@ -216,9 +217,9 @@ public function store(Document $document, $collectionId = null, $options = array $document->setIsNew(false); return $result; - }else{ + } else { - if($collectionId){ + if ($collectionId) { throw new ClientException('An existing document cannot be stored into a new collection'); } @@ -380,8 +381,9 @@ public function updateById($collectionId, $documentId, Document $document, $opti $url = UrlHelper::buildUrl(Urls::URL_DOCUMENT, $collectionId, $documentId); $url = UrlHelper::appendParamsUrl($url, $params); $result = $this->getConnection()->patch($url, $this->json_encode_wrapper($document->getAll())); - $json = $result->getJson(); + $json = $result->getJson(); $document->setRevision($json[Document::ENTRY_REV]); + return true; } @@ -465,8 +467,9 @@ public function replaceById($collectionId, $documentId, Document $document, $opt $url = UrlHelper::buildUrl(Urls::URL_DOCUMENT, $collectionId, $documentId); $url = UrlHelper::appendParamsUrl($url, $params); $result = $this->getConnection()->put($url, $this->json_encode_wrapper($data)); - $json = $result->getJson(); + $json = $result->getJson(); $document->setRevision($json[Document::ENTRY_REV]); + return true; } diff --git a/lib/triagens/ArangoDb/Graph.php b/lib/triagens/ArangoDb/Graph.php index 14889b3b..fae569a6 100644 --- a/lib/triagens/ArangoDb/Graph.php +++ b/lib/triagens/ArangoDb/Graph.php @@ -49,7 +49,8 @@ class Graph extends /** * Constructs an empty graph * - * @param array $options - optional, initial $options for document + * @param array $name - optional, initial name for graph + * @param array $options - optional, initial $options for graph * * @return void */ @@ -57,7 +58,7 @@ public function __construct($name = null, array $options = array()) { // prevent backwards compatibility break where the first parameter is the $options array - if(!is_array($name) && $name != null){ + if (!is_array($name) && $name != null) { $this->set('_key', $name); } @@ -134,7 +135,7 @@ public function getEdgesCollection() public function set($key, $value) { - if(in_array($key, array(self::ENTRY_VERTICES, self::ENTRY_EDGES))){ + if (in_array($key, array(self::ENTRY_VERTICES, self::ENTRY_EDGES))) { if (!is_string($key)) { throw new ClientException('Invalid document attribute key'); @@ -154,8 +155,7 @@ public function set($key, $value) return; } - - }else{ + } else { parent::set($key, $value); } } diff --git a/lib/triagens/ArangoDb/GraphHandler.php b/lib/triagens/ArangoDb/GraphHandler.php index f64088cc..9501cb9b 100644 --- a/lib/triagens/ArangoDb/GraphHandler.php +++ b/lib/triagens/ArangoDb/GraphHandler.php @@ -99,25 +99,26 @@ public function createGraph(Graph $graph) * * @throws Exception * - * @param String - $graph - The name of the graph + * @param string $graph - The name of the graph + * @param array $options - can be used to provide additional options * * @return Graph - A graph object representing the graph * @since 1.2 * * @example "ArangoDb/examples/graph.php" How to use this function - * @example "ArangoDb/examples/graph.php" How to use this function */ public function getGraph($graph, array $options = array()) { - $url = UrlHelper::buildUrl(Urls::URL_GRAPH, $graph); + $url = UrlHelper::buildUrl(Urls::URL_GRAPH, $graph); $response = $this->getConnection()->get($url); - $data = $response->getJson(); + $data = $response->getJson(); - if($data['error']){ + if ($data['error']) { return false; } $options['_isNew'] = false; + return Graph::createFromArray($data['graph'], $options); } @@ -171,8 +172,8 @@ public function properties($graph) * * @throws Exception * - * @param mixed $graphName - the name of the graph - * @param mixed $document - the vertex to be added, can be passed as a vertex object or an array + * @param mixed $graphName - the name of the graph + * @param mixed $document - the vertex to be added, can be passed as a vertex object or an array * * @return mixed - id of vertex created * @since 1.2 @@ -200,6 +201,7 @@ public function saveVertex($graphName, $document) } $document->setIsNew(false); + return $document->getId(); } @@ -233,6 +235,7 @@ public function getVertex($graphName, $vertexId, array $options = array()) $vertex = $jsonArray['vertex']; $options['_isNew'] = false; + return Vertex::createFromArray($vertex, $options); } @@ -250,10 +253,10 @@ public function getVertex($graphName, $vertexId, array $options = array()) * * @throws Exception * - * @param string $graphName - the graph name as string - * @param mixed $vertexId - the vertex id as string or number - * @param Document $document - the vertex-document to be updated - * @param 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) + * @param string $graphName - the graph name as string + * @param mixed $vertexId - the vertex id as string or number + * @param Document $document - the vertex-document to be updated + * @param 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) *

    Options are : *

  • 'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])
  • *
  • 'waitForSync' - can be used to force synchronisation of the document replacement operation to disk even in case that the waitForSync flag had been disabled for the entire collection
  • @@ -357,9 +360,10 @@ public function updateVertex($graphName, $vertexId, Document $document, $options $url = UrlHelper::buildUrl(Urls::URL_GRAPH, $graphName, Urls::URLPART_VERTEX, $vertexId); $url = UrlHelper::appendParamsUrl($url, $params); $result = $this->getConnection()->patch($url, $this->json_encode_wrapper($document->getAll())); - $json = $result->getJson(); + $json = $result->getJson(); $vertex = $json['vertex']; $document->setRevision($vertex[Vertex::ENTRY_REV]); + return true; } @@ -420,11 +424,11 @@ public function removeVertex($graphName, $vertexId, $revision = null, $options = * * @throws Exception * - * @param mixed $graphName - the graph name as string - * @param mixed $from - the 'from' vertex - * @param mixed $to - the 'to' vertex - * @param mixed $label - (optional) a label for the edge - * @param mixed $document - the edge-document to be added, can be passed as an edge object or an array + * @param mixed $graphName - the graph name as string + * @param mixed $from - the 'from' vertex + * @param mixed $to - the 'to' vertex + * @param mixed $label - (optional) a label for the edge + * @param mixed $document - the edge-document to be added, can be passed as an edge object or an array * * @return mixed - id of edge created * @since 1.2 @@ -459,6 +463,7 @@ public function saveEdge($graphName, $from, $to, $label = null, $document) } $document->setIsNew(false); + return $document->getId(); } @@ -492,6 +497,7 @@ public function getEdge($graphName, $edgeId, array $options = array()) $edge = $jsonArray['edge']; $options['_isNew'] = false; + return Edge::createFromArray($edge, $options); } @@ -509,11 +515,11 @@ public function getEdge($graphName, $edgeId, array $options = array()) * * @throws Exception * - * @param mixed $graphName - graph name as string or number - * @param mixed $edgeId - edge id as string or number - * @param mixed $label - (optional) label for the edge - * @param Edge $document - edge document to be updated - * @param mixed $options - optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method) + * @param mixed $graphName - graph name as string or number + * @param mixed $edgeId - edge id as string or number + * @param mixed $label - (optional) label for the edge + * @param Edge $document - edge document to be updated + * @param mixed $options - optional, array of options (see below) or the boolean value for $policy (for compatibility prior to version 1.1 of this method) *

    Options are : *

  • 'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])
  • *
  • 'waitForSync' - can be used to force synchronisation of the document replacement operation to disk even in case that the waitForSync flag had been disabled for the entire collection
  • @@ -581,11 +587,11 @@ public function ReplaceEdge($graphName, $edgeId, $label, Edge $document, $option * * @throws Exception * - * @param string $graphName - graph name as string - * @param mixed $edgeId - edge id as string or number - * @param mixed $label - (optional) label for the edge - * @param Edge $document - patch edge-document which contains the attributes and values to be updated - * @param mixed $options - optional, array of options (see below) + * @param string $graphName - graph name as string + * @param mixed $edgeId - edge id as string or number + * @param mixed $label - (optional) label for the edge + * @param Edge $document - patch edge-document which contains the attributes and values to be updated + * @param mixed $options - optional, array of options (see below) *

    Options are : *

  • 'policy' - update policy to be used in case of conflict ('error', 'last' or NULL [use default])
  • *
  • '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)
  • @@ -626,9 +632,10 @@ public function updateEdge($graphName, $edgeId, $label, Edge $document, $options $url = UrlHelper::buildUrl(Urls::URL_GRAPH, $graphName, Urls::URLPART_EDGE, $edgeId); $url = UrlHelper::appendParamsUrl($url, $params); $result = $this->getConnection()->patch($url, $this->json_encode_wrapper($document->getAll())); - $json = $result->getJson(); - $edge = $json['edge']; + $json = $result->getJson(); + $edge = $json['edge']; $document->setRevision($edge[Edge::ENTRY_REV]); + return true; } diff --git a/lib/triagens/ArangoDb/TraceRequest.php b/lib/triagens/ArangoDb/TraceRequest.php index 0646b693..c46b6a07 100644 --- a/lib/triagens/ArangoDb/TraceRequest.php +++ b/lib/triagens/ArangoDb/TraceRequest.php @@ -10,55 +10,68 @@ namespace triagens\ArangoDb; +/** + * Class TraceRequest + * + * @author Francis Chuang + * @package triagens\ArangoDb + */ class TraceRequest { /** * Stores each header as an array (key => value) element + * * @var array */ private $_headers = array(); /** * Stores the http method + * * @var string */ private $_method; /** * Stores the request url + * * @var string */ private $_requestUrl; /** * Store the string of the body + * * @var string */ private $_body; /** * The http message type + * * @var string */ private $_type = "request"; /** * Set up the request trace - * @param array $headers - the array of http headers - * @param string $method - the request method + * + * @param array $headers - the array of http headers + * @param string $method - the request method * @param string $requestUrl - the request url - * @param string $body - the string of http body + * @param string $body - the string of http body */ public function __construct($headers, $method, $requestUrl, $body) { - $this->_headers = $headers; - $this->_method = $method; + $this->_headers = $headers; + $this->_method = $method; $this->_requestUrl = $requestUrl; - $this->_body = $body; + $this->_body = $body; } /** * Get an array of the request headers + * * @return array */ public function getHeaders() @@ -68,6 +81,7 @@ public function getHeaders() /** * Get the request method + * * @return string */ public function getMethod() @@ -77,6 +91,7 @@ public function getMethod() /** * Get the request url + * * @return string */ public function getRequestUrl() @@ -86,6 +101,7 @@ public function getRequestUrl() /** * Get the body of the request + * * @return string */ public function getBody() @@ -95,6 +111,7 @@ public function getBody() /** * Get the http message type + * * @return string */ public function getType() diff --git a/lib/triagens/ArangoDb/TraceResponse.php b/lib/triagens/ArangoDb/TraceResponse.php index c3383641..23860334 100644 --- a/lib/triagens/ArangoDb/TraceResponse.php +++ b/lib/triagens/ArangoDb/TraceResponse.php @@ -10,95 +10,108 @@ namespace triagens\ArangoDb; +/** + * Class TraceResponse + * + * @author Francis Chuang + * @package triagens\ArangoDb + */ class TraceResponse { /** * Stores each header as an array (key => value) element + * * @var array */ private $_headers = array(); /** * The http status code + * * @var int */ private $_httpCode; /** * The raw body of the response + * * @var string */ private $_body; /** * The type of http message + * * @var string */ private $_type = "response"; /** * Used to look up the definition for an http code + * * @var array */ private $_httpCodeDefinitions = array( - 100 => 'Continue', - 101 => 'Switching Protocols', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', + 100 => 'Continue', + 101 => 'Switching Protocols', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', ); /** * Set up the response trace - * @param array $headers - the array of http headers - * @param int $httpCode - the http code - * @param string $body - the string of http body + * + * @param array $headers - the array of http headers + * @param int $httpCode - the http code + * @param string $body - the string of http body */ public function __construct($headers, $httpCode, $body) { - $this->_headers = $headers; + $this->_headers = $headers; $this->_httpCode = $httpCode; - $this->_body = $body; + $this->_body = $body; } /** * Get an array of the response headers + * * @return array */ public function getHeaders() @@ -108,6 +121,7 @@ public function getHeaders() /** * Get the http response code + * * @return int */ public function getHttpCode() @@ -117,13 +131,13 @@ public function getHttpCode() /** * Get the http code definition - * @param int $code - the http code + * * @throws ClientException * @return string */ public function getHttpCodeDefinition() { - if(!isset($this->_httpCodeDefinitions[$this->getHttpCode()])){ + if (!isset($this->_httpCodeDefinitions[$this->getHttpCode()])) { throw new ClientException("Invalid http code provided."); } @@ -132,6 +146,7 @@ public function getHttpCodeDefinition() /** * Get the response body + * * @return string */ public function getBody() @@ -141,6 +156,7 @@ public function getBody() /** * Get the http message type + * * @return string */ public function getType() From 79df062a2b255f124e505ae9c974be7f22c3ee2c Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 1 May 2013 19:16:17 +0300 Subject: [PATCH 2/5] Regenerated docs --- docs/classes.svg | 304 +- .../triagens.ArangoDb.AdminHandler.html | 3 +- .../classes/triagens.ArangoDb.Autoloader.html | 3 +- docs/classes/triagens.ArangoDb.Batch.html | 3 +- docs/classes/triagens.ArangoDb.BatchPart.html | 3 +- docs/classes/triagens.ArangoDb.BindVars.html | 3 +- .../triagens.ArangoDb.ClientException.html | 3 +- .../classes/triagens.ArangoDb.Collection.html | 132 +- .../triagens.ArangoDb.CollectionHandler.html | 347 +- .../triagens.ArangoDb.ConnectException.html | 3 +- .../classes/triagens.ArangoDb.Connection.html | 3 +- .../triagens.ArangoDb.ConnectionOptions.html | 10 +- docs/classes/triagens.ArangoDb.Cursor.html | 3 +- .../triagens.ArangoDb.DefaultValues.html | 3 +- docs/classes/triagens.ArangoDb.Document.html | 45 +- .../triagens.ArangoDb.DocumentHandler.html | 51 +- docs/classes/triagens.ArangoDb.Edge.html | 65 +- .../triagens.ArangoDb.EdgeHandler.html | 57 +- docs/classes/triagens.ArangoDb.Endpoint.html | 3 +- docs/classes/triagens.ArangoDb.Exception.html | 3 +- docs/classes/triagens.ArangoDb.Graph.html | 123 +- .../triagens.ArangoDb.GraphHandler.html | 51 +- docs/classes/triagens.ArangoDb.Handler.html | 3 +- .../classes/triagens.ArangoDb.HttpHelper.html | 41 +- .../triagens.ArangoDb.HttpResponse.html | 3 +- docs/classes/triagens.ArangoDb.Scope.html | 3 +- .../triagens.ArangoDb.ServerException.html | 3 +- docs/classes/triagens.ArangoDb.Statement.html | 3 +- .../triagens.ArangoDb.TraceRequest.html | 239 ++ .../triagens.ArangoDb.TraceResponse.html | 238 ++ docs/classes/triagens.ArangoDb.URLHelper.html | 9 +- docs/classes/triagens.ArangoDb.URLs.html | 16 +- .../triagens.ArangoDb.UpdatePolicy.html | 3 +- docs/classes/triagens.ArangoDb.UrlHelper.html | 198 + docs/classes/triagens.ArangoDb.Urls.html | 321 ++ docs/classes/triagens.ArangoDb.User.html | 65 +- .../triagens.ArangoDb.UserHandler.html | 3 +- .../triagens.ArangoDb.ValueValidator.html | 3 +- docs/classes/triagens.ArangoDb.Vertex.html | 65 +- .../triagens.ArangoDb.VertexHandler.html | 57 +- docs/deprecated.html | 21 +- docs/errors.html | 5 +- docs/graph_class.html | 3 +- docs/index.html | 4 +- docs/markers.html | 3 +- docs/namespaces/triagens.ArangoDb.html | 33 +- docs/namespaces/triagens.html | 33 +- docs/packages/ArangoDbPhpClient.html | 31 +- docs/packages/Default.html | 3 +- docs/structure.xml | 3674 +++++++++++------ 50 files changed, 4785 insertions(+), 1519 deletions(-) create mode 100644 docs/classes/triagens.ArangoDb.TraceRequest.html create mode 100644 docs/classes/triagens.ArangoDb.TraceResponse.html create mode 100644 docs/classes/triagens.ArangoDb.UrlHelper.html create mode 100644 docs/classes/triagens.ArangoDb.Urls.html diff --git a/docs/classes.svg b/docs/classes.svg index 6693a28b..fadc6380 100644 --- a/docs/classes.svg +++ b/docs/classes.svg @@ -4,95 +4,95 @@ - - + + G - + cluster_triagens - - - - - + + + + + -triagens +triagens cluster_triagens\ArangoDb - - - - - + + + + + -ArangoDb +ArangoDb \\triagens\\ArangoDb\\ValueValidator - -ValueValidator + +ValueValidator \\triagens\\ArangoDb\\Batch - -Batch + +Batch \\triagens\\ArangoDb\\Vertex - -Vertex + +Vertex -\\triagens\\ArangoDb\\Document +\\triagens\\ArangoDb\\Document - -Document + +Document \\triagens\\ArangoDb\\Vertex->\\triagens\\ArangoDb\\Document - - + + \\triagens\\ArangoDb\\Exception - -Exception + +Exception -\\Exception +\\Exception \Exception \\triagens\\ArangoDb\\Exception->\\Exception - - + + \\triagens\\ArangoDb\\BindVars - -BindVars + +BindVars \\triagens\\ArangoDb\\Scope - -Scope + +Scope @@ -103,7 +103,7 @@ -\\ArrayAccess +\\ArrayAccess \\ArrayAccess @@ -115,251 +115,265 @@ \\triagens\\ArangoDb\\Statement - -Statement + +Statement \\triagens\\ArangoDb\\DocumentHandler - -DocumentHandler + +DocumentHandler -\\triagens\\ArangoDb\\Handler +\\triagens\\ArangoDb\\Handler - -«abstract» -Handler + +«abstract» +Handler \\triagens\\ArangoDb\\DocumentHandler->\\triagens\\ArangoDb\\Handler - - + + \\triagens\\ArangoDb\\UserHandler - -UserHandler + +UserHandler \\triagens\\ArangoDb\\UserHandler->\\triagens\\ArangoDb\\Handler - - + + \\triagens\\ArangoDb\\Connection - -Connection + +Connection + + + +\\triagens\\ArangoDb\\TraceRequest + + +TraceRequest -\\triagens\\ArangoDb\\DefaultValues +\\triagens\\ArangoDb\\DefaultValues - -«abstract» -DefaultValues + +«abstract» +DefaultValues -\\triagens\\ArangoDb\\ConnectException +\\triagens\\ArangoDb\\ConnectException - -ConnectException + +ConnectException \\triagens\\ArangoDb\\ConnectException->\\triagens\\ArangoDb\\Exception - - + + -\\triagens\\ArangoDb\\ClientException +\\triagens\\ArangoDb\\ClientException - -ClientException + +ClientException \\triagens\\ArangoDb\\ClientException->\\triagens\\ArangoDb\\Exception - - + + -\\triagens\\ArangoDb\\ServerException +\\triagens\\ArangoDb\\ServerException - -ServerException + +ServerException \\triagens\\ArangoDb\\ServerException->\\triagens\\ArangoDb\\Exception - - + + -\\triagens\\ArangoDb\\Graph +\\triagens\\ArangoDb\\Graph - -Graph + +Graph \\triagens\\ArangoDb\\Graph->\\triagens\\ArangoDb\\Document - - + + -\\triagens\\ArangoDb\\HttpResponse +\\triagens\\ArangoDb\\HttpResponse - -HttpResponse + +HttpResponse -\\triagens\\ArangoDb\\BatchPart +\\triagens\\ArangoDb\\BatchPart - -BatchPart + +BatchPart -\\triagens\\ArangoDb\\UpdatePolicy +\\triagens\\ArangoDb\\UpdatePolicy - -UpdatePolicy + +UpdatePolicy -\\triagens\\ArangoDb\\CollectionHandler +\\triagens\\ArangoDb\\CollectionHandler - -CollectionHandler + +CollectionHandler \\triagens\\ArangoDb\\CollectionHandler->\\triagens\\ArangoDb\\Handler - - + + -\\triagens\\ArangoDb\\Endpoint +\\triagens\\ArangoDb\\Endpoint - -Endpoint + +Endpoint -\\triagens\\ArangoDb\\Collection +\\triagens\\ArangoDb\\Collection - -Collection + +Collection -\\triagens\\ArangoDb\\HttpHelper +\\triagens\\ArangoDb\\HttpHelper - -HttpHelper + +HttpHelper -\\triagens\\ArangoDb\\VertexHandler +\\triagens\\ArangoDb\\VertexHandler - -VertexHandler + +VertexHandler \\triagens\\ArangoDb\\VertexHandler->\\triagens\\ArangoDb\\DocumentHandler - - + + - -\\triagens\\ArangoDb\\URLHelper - - -«abstract» -URLHelper + +\\triagens\\ArangoDb\\UrlHelper + + +«abstract» +UrlHelper -\\triagens\\ArangoDb\\Edge +\\triagens\\ArangoDb\\Edge - -Edge + +Edge \\triagens\\ArangoDb\\Edge->\\triagens\\ArangoDb\\Document - - + + -\\triagens\\ArangoDb\\EdgeHandler +\\triagens\\ArangoDb\\EdgeHandler - -EdgeHandler + +EdgeHandler \\triagens\\ArangoDb\\EdgeHandler->\\triagens\\ArangoDb\\DocumentHandler - - + + -\\triagens\\ArangoDb\\Autoloader +\\triagens\\ArangoDb\\Autoloader - -Autoloader + +Autoloader + + + +\\triagens\\ArangoDb\\TraceResponse + + +TraceResponse -\\triagens\\ArangoDb\\User +\\triagens\\ArangoDb\\User - -User + +User \\triagens\\ArangoDb\\User->\\triagens\\ArangoDb\\Document - - + + - -\\triagens\\ArangoDb\\URLs - + +\\triagens\\ArangoDb\\Urls + «abstract» -URLs +Urls -\\triagens\\ArangoDb\\AdminHandler +\\triagens\\ArangoDb\\AdminHandler - -AdminHandler + +AdminHandler \\triagens\\ArangoDb\\AdminHandler->\\triagens\\ArangoDb\\Handler - - + + -\\triagens\\ArangoDb\\Cursor +\\triagens\\ArangoDb\\Cursor Cursor -\\Iterator +\\Iterator \\Iterator @@ -369,16 +383,16 @@ -\\triagens\\ArangoDb\\GraphHandler +\\triagens\\ArangoDb\\GraphHandler - -GraphHandler + +GraphHandler \\triagens\\ArangoDb\\GraphHandler->\\triagens\\ArangoDb\\Handler - - + + diff --git a/docs/classes/triagens.ArangoDb.AdminHandler.html b/docs/classes/triagens.ArangoDb.AdminHandler.html index 0ddba0ac..55e7fa20 100644 --- a/docs/classes/triagens.ArangoDb.AdminHandler.html +++ b/docs/classes/triagens.ArangoDb.AdminHandler.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Get the isSystem value (if already known)
    getIsSystem()
  • Get the isVolatile value (if already known)
    getIsVolatile()
  • Get the journalSize value (if already known)
    getJournalSize()
  • +
  • Get the collection key options (if already known)
    getKeyOptions()
  • Get the collection name (if already known)
    getName()
  • +
  • Get the collection status (if already known)
    getStatus()
  • Get the collection type (if already known)
    getType()
  • Get the waitForSync value (if already known)
    getWaitForSync()
  • Set a collection attribute
    set()
  • @@ -76,7 +79,9 @@
  • Set the isSystem value
    setIsSystem()
  • Set the isVolatile value
    setIsVolatile()
  • Set the journalSize value
    setJournalSize()
  • +
  • Set the collection key options.
    setKeyOptions()
  • Set the collection name
    setName()
  • +
  • Set the collection status.
    setStatus()
  • Set the collection type.
    setType()
  • Set the waitForSync value
    setWaitForSync()
  • Returns the collection as JSON-encoded string
    toJson()
  • @@ -93,7 +98,9 @@
  • $_isSystem
  • $_isVolatile
  • $_journalSize
  • +
  • $_keyOptions
  • $_name
  • +
  • $_status
  • $_type
  • $_waitForSync
  • @@ -105,10 +112,17 @@
  • Collection 'isSystem' index
    ENTRY_IS_SYSTEM
  • Collection 'isVolatile' sindex
    ENTRY_IS_VOLATILE
  • Collection 'journalSize' index
    ENTRY_JOURNAL_SIZE
  • +
  • Collection 'keyOptions' index
    ENTRY_KEY_OPTIONS
  • Collection name index
    ENTRY_NAME
  • +
  • Collection 'status' index
    ENTRY_STATUS
  • Collection type index
    ENTRY_TYPE
  • Collection 'waitForSync' index
    ENTRY_WAIT_SYNC
  • properties option
    OPTION_PROPERTIES
  • +
  • Collectiong being unloaded
    STATUS_BEING_UNLOADED
  • +
  • Deleted collection
    STATUS_DELETED
  • +
  • Loaded collection
    STATUS_LOADED
  • +
  • New born collection
    STATUS_NEW_BORN
  • +
  • Unloaded collection
    STATUS_UNLOADED
  • document collection type
    TYPE_DOCUMENT
  • edge collection type
    TYPE_EDGE
  • @@ -252,6 +266,17 @@

    Returns

    bool- journalSize value +
    +

    Get the collection key options (if already known)

    +
    getKeyOptions() : array
    +
    +
    +
    +

    Returns

    +
    +array- keyOptions
    +
    +

    Get the collection name (if already known)

    getName() : string
    @@ -263,6 +288,17 @@

    Returns

    string- name
    +
    +

    Get the collection status (if already known)

    +
    getStatus() : int
    +
    +
    +
    +

    Returns

    +
    +int- status
    +
    +

    Get the collection type (if already known)

    getType() : string
    @@ -379,6 +415,26 @@

    $value

    +
    +

    Set the collection key options.

    +
    setKeyOptions(array $keyOptions) : void
    +
    +
    +
    +

    Parameters

    +
    +

    $keyOptions

    +array
      +
    • An associative array containing optional keys: type, allowUserKeys, increment, offset.
    • +
    +
    +

    Exceptions

    + + + +
    \triagens\ArangoDb\ClientException
    +
    +

    Set the collection name

    setName(string $name) : void
    @@ -399,6 +455,26 @@

    Exceptions

    +
    +

    Set the collection status.

    +
    setStatus(int $status) : void
    +
    +
    +

    This is useful before a collection is create()'ed in order to set a status.

    +

    Parameters

    +
    +

    $status

    +int
      +
    • statuses = 1 -> new born, status = 2 -> unloaded, status = 3 -> loaded, status = 4 -> being unloaded, status = 5 -> deleted
    • +
    +
    +

    Exceptions

    + + + +
    \triagens\ArangoDb\ClientException
    +
    +

    Set the collection type.

    setType(int $type) : void
    @@ -483,12 +559,24 @@

    + 
    +

    +
    $_keyOptions : array
    +
    +
    +
     

    $_name : string
    + 
    +

    +
    $_status : int
    +
    +
    +
     

    $_type : int
    @@ -527,12 +615,24 @@

    Collection 'journalSize' index

    + 
    +

    Collection 'keyOptions' index

    +
    ENTRY_KEY_OPTIONS 
    +
    +
    +
     

    Collection name index

    ENTRY_NAME 
    + 
    +

    Collection 'status' index

    +
    ENTRY_STATUS 
    +
    +
    +
     

    Collection type index

    ENTRY_TYPE 
    @@ -551,6 +651,36 @@

    properties option

    + 
    +

    Collectiong being unloaded

    +
    STATUS_BEING_UNLOADED 
    +
    +
    +
    + 
    +

    Deleted collection

    +
    STATUS_DELETED 
    +
    +
    +
    + 
    +

    Loaded collection

    +
    STATUS_LOADED 
    +
    +
    +
    + 
    +

    New born collection

    +
    STATUS_NEW_BORN 
    +
    +
    +
    + 
    +

    Unloaded collection

    +
    STATUS_UNLOADED 
    +
    +
    +
     

    document collection type

    TYPE_DOCUMENT 
    @@ -570,7 +700,7 @@

    edge collection type

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/classes/triagens.ArangoDb.CollectionHandler.html b/docs/classes/triagens.ArangoDb.CollectionHandler.html index 26142a60..284913f6 100644 --- a/docs/classes/triagens.ArangoDb.CollectionHandler.html +++ b/docs/classes/triagens.ArangoDb.CollectionHandler.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • "Create collections if they don't exist" index constant
    OPTION_CREATE
  • Delete policy index constant
    OPTION_DELETE_POLICY
  • Endpoint string index constant
    OPTION_ENDPOINT
  • +
  • Enhanced trace
    OPTION_ENHANCED_TRACE
  • Host name string index constant (deprecated, use endpoint instead)
    OPTION_HOST
  • Wait for sync index constant
    OPTION_IS_SYSTEM
  • Wait for sync index constant
    OPTION_IS_VOLATILE
  • @@ -403,6 +405,12 @@

    Endpoint string index constant

    + 
    +

    Enhanced trace

    +
    OPTION_ENHANCED_TRACE 
    +
    +
    +
     

    Host name string index constant (deprecated, use endpoint instead)

    OPTION_HOST 
    @@ -500,7 +508,7 @@

    Wait for sync index constant

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/classes/triagens.ArangoDb.Cursor.html b/docs/classes/triagens.ArangoDb.Cursor.html index 02b2f0b1..9d9af45b 100644 --- a/docs/classes/triagens.ArangoDb.Cursor.html +++ b/docs/classes/triagens.ArangoDb.Cursor.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Get the document id (if already known)
    getId()
  • Get the internal document id (if already known)
    getInternalId()
  • Get the internal document key (if already known)
    getInternalKey()
  • +
  • Get the isNew flag
    getIsNew()
  • Get the document key (if already known).
    getKey()
  • Get the document revision (if already known)
    getRevision()
  • Set a document attribute
    set()
  • @@ -81,6 +83,7 @@
  • Set the hidden attributes
    setHiddenAttributes()
  • Set the internal document id
    setInternalId()
  • Set the internal document key
    setInternalKey()
  • +
  • Set the isNew flag
    setIsNew()
  • Set the document revision
    setRevision()
  • Returns the document as JSON-encoded string
    toJson()
  • Returns the document as a serialized string
    toSerialized()
  • @@ -95,6 +98,7 @@
  • $_changed
  • $_hidden
  • $_id
  • +
  • $_isNew
  • $_key
  • $_rev
  • $_values
  • @@ -105,6 +109,7 @@
  • Replace an existing document in a collection, identified by the document itself
    replace()
  • Replace an existing document in a collection, identified by collection id and document id
    replaceById()
  • save a document to a collection
    save()
  • +
  • Store a document to a collection
    store()
  • Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.
    update()
  • Update an existing document in a collection, identified by collection id and document id @@ -661,6 +663,53 @@

    $options

  • optional, prior to v1.2.0 this was a boolean value for create. Since v1.0.0 it's an array of options.
  • +

    Options are :
    +

  • 'create' - 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.
  • +

    + +

    Exceptions

    + + + +
    \triagens\ArangoDb\Exception
    +

    Returns

    +
    +mixed- id of document created
    + + +
    +

    Store a document to a collection

    +
    store(\triagens\ArangoDb\Document $document, mixed $collectionId, bool | array $options) : mixed
    +
    +
    +

    This is an alias/shortcut to save() and replace(). Instead of having to determine which of the 3 functions to use, +simply pass the document to store() and it will figure out which one to call.

    + +

    This will throw if the document cannot be saved or replaced.

    + + + +
    since1.0
    +

    Parameters

    +
    +

    $document

    +\triagens\ArangoDb\Document
      +
    • the document to be added, can be passed as a document or an array
    • +
    +
    +
    +

    $collectionId

    +mixed
      +
    • collection id as string or number
    • +
    +
    +
    +

    $options

    +boolarray
      +
    • optional, prior to v1.2.0 this was a boolean value for create. Since v1.2.0 it's an array of options.
    • +
    +

    Options are :

  • 'create' - 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.
  • @@ -1076,7 +1125,7 @@

    example parameter

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/classes/triagens.ArangoDb.Edge.html b/docs/classes/triagens.ArangoDb.Edge.html index f1935a2b..2bcb50dc 100644 --- a/docs/classes/triagens.ArangoDb.Edge.html +++ b/docs/classes/triagens.ArangoDb.Edge.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Get the document id (if already known)
    getId()
  • Get the internal document id (if already known)
    getInternalId()
  • Get the internal document key (if already known)
    getInternalKey()
  • +
  • Get the isNew flag
    getIsNew()
  • Get the document key (if already known).
    getKey()
  • Get the document revision (if already known)
    getRevision()
  • Get the 'to' vertex document-handler (if already known)
    getTo()
  • @@ -84,6 +86,7 @@
  • Set the hidden attributes
    setHiddenAttributes()
  • Set the internal document id
    setInternalId()
  • Set the internal document key
    setInternalKey()
  • +
  • Set the isNew flag
    setIsNew()
  • Set the document revision
    setRevision()
  • Set the 'to' vertex document-handler
    setTo()
  • Returns the document as JSON-encoded string
    toJson()
  • @@ -100,6 +103,7 @@
  • $_from
  • $_hidden
  • $_id
  • +
  • $_isNew
  • $_key
  • $_rev
  • $_to
  • @@ -112,6 +116,7 @@
  • Document _from index
    ENTRY_FROM
  • hidden atttribute index
    ENTRY_HIDDEN
  • Document id index
    ENTRY_ID
  • +
  • isNew id index
    ENTRY_ISNEW
  • Document key index
    ENTRY_KEY
  • Revision id index
    ENTRY_REV
  • Revision _to index
    ENTRY_TO
  • @@ -466,6 +471,21 @@

    Returns

    string- internal document key, might be NULL if document does not yet have a key
    +
    +

    Get the isNew flag

    +
    getIsNew() : bool
    +
    Inherited
    +
    +
    + + + +
    inherited_from\triagens\ArangoDb\Document::getIsNew()
    +

    Returns

    +
    +bool$isNew - flags if new or existing doc
    +
    +

    Get the document key (if already known).

    getKey() : mixed
    @@ -640,6 +660,25 @@

    Exceptions

    +
    +

    Set the isNew flag

    +
    setIsNew(bool $isNew) : void
    +
    Inherited
    +
    +
    + + + +
    inherited_from\triagens\ArangoDb\Document::setIsNew()
    +

    Parameters

    +
    +

    $isNew

    +bool
      +
    • flags if new or existing doc
    • +
    +
    +
    +

    Set the document revision

    setRevision(mixed $rev) : void
    @@ -778,6 +817,18 @@

    + 
    +

    +
    $_isNew : bool
    +
    Inherited
    +
    +
    + + + +
    inherited_from\triagens\ArangoDb\Document::$$_isNew
    +
    +
     

    $_key : string
    @@ -852,6 +903,18 @@

    Document id index

    + 
    +

    isNew id index

    +
    ENTRY_ISNEW 
    +
    Inherited
    +
    +
    + + + +
    inherited_from\triagens\ArangoDb\Document::ENTRY_ISNEW
    +
    +
     

    Document key index

    ENTRY_KEY 
    @@ -925,7 +988,7 @@

    waitForSync option index

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/classes/triagens.ArangoDb.EdgeHandler.html b/docs/classes/triagens.ArangoDb.EdgeHandler.html index c367f5cd..0b894bdb 100644 --- a/docs/classes/triagens.ArangoDb.EdgeHandler.html +++ b/docs/classes/triagens.ArangoDb.EdgeHandler.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Replace an existing document in a collection, identified by the document itself
    replace()
  • Replace an existing document in a collection, identified by collection id and document id
    replaceById()
  • save an edge to an edge-collection
    saveEdge()
  • +
  • Store a document to a collection
    store()
  • Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.
    update()
  • Update an existing document in a collection, identified by collection id and document id @@ -776,6 +778,59 @@

    Returns

    mixed- id of document created +
    +

    Store a document to a collection

    +
    store(\triagens\ArangoDb\Document $document, mixed $collectionId, bool | array $options) : mixed
    +
    Inherited
    +
    +

    This is an alias/shortcut to save() and replace(). Instead of having to determine which of the 3 functions to use, +simply pass the document to store() and it will figure out which one to call.

    + +

    This will throw if the document cannot be saved or replaced.

    + + + + + + + + + +
    since1.0
    inherited_from\triagens\ArangoDb\DocumentHandler::store()
    +

    Parameters

    +
    +

    $document

    +\triagens\ArangoDb\Document
      +
    • the document to be added, can be passed as a document or an array
    • +
    +
    +
    +

    $collectionId

    +mixed
      +
    • collection id as string or number
    • +
    +
    +
    +

    $options

    +boolarray
      +
    • optional, prior to v1.2.0 this was a boolean value for create. Since v1.2.0 it's an array of options.
    • +
    + +

    Options are :
    +

  • 'create' - 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.
  • +

    + +

    Exceptions

    + + + +
    \triagens\ArangoDb\Exception
    +

    Returns

    +
    +mixed- id of document created
    + +

    Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.

    update(\triagens\ArangoDb\Document $document, mixed $options) : bool
    @@ -1266,7 +1321,7 @@

    vertex parameter

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/classes/triagens.ArangoDb.Endpoint.html b/docs/classes/triagens.ArangoDb.Endpoint.html index 0acaab48..06953613 100644 --- a/docs/classes/triagens.ArangoDb.Endpoint.html +++ b/docs/classes/triagens.ArangoDb.Endpoint.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • -
    diff --git a/docs/classes/triagens.ArangoDb.URLs.html b/docs/classes/triagens.ArangoDb.URLs.html index 7a594097..21b7c51a 100644 --- a/docs/classes/triagens.ArangoDb.URLs.html +++ b/docs/classes/triagens.ArangoDb.URLs.html @@ -3,7 +3,7 @@ -ArangoDB PHP client API » \triagens\ArangoDb\URLs +ArangoDB PHP client API » \triagens\ArangoDb\Urls @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • base URL part for admin status
    URL_ADMIN_STATUS
  • base URL part for admin time
    URL_ADMIN_TIME
  • base URL part for admin version
    URL_ADMIN_VERSION
  • +
  • base URL part for any
    URL_ANY
  • base URL part for batch processing
    URL_BATCH
  • URL base part for all collection-related REST calls
    URL_COLLECTION
  • base URL part for cursor related operations
    URL_CURSOR
  • @@ -92,7 +94,7 @@
    -
    diff --git a/docs/classes/triagens.ArangoDb.UpdatePolicy.html b/docs/classes/triagens.ArangoDb.UpdatePolicy.html index c2a51a2b..264e6d65 100644 --- a/docs/classes/triagens.ArangoDb.UpdatePolicy.html +++ b/docs/classes/triagens.ArangoDb.UpdatePolicy.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Get the document id (if already known)
    getId()
  • Get the internal document id (if already known)
    getInternalId()
  • Get the internal document key (if already known)
    getInternalKey()
  • +
  • Get the isNew flag
    getIsNew()
  • Get the document key (if already known).
    getKey()
  • Get the document revision (if already known)
    getRevision()
  • Set a document attribute
    set()
  • @@ -81,6 +83,7 @@
  • Set the hidden attributes
    setHiddenAttributes()
  • Set the internal document id
    setInternalId()
  • Set the internal document key
    setInternalKey()
  • +
  • Set the isNew flag
    setIsNew()
  • Set the document revision
    setRevision()
  • Returns the document as JSON-encoded string
    toJson()
  • Returns the document as a serialized string
    toSerialized()
  • @@ -95,6 +98,7 @@
  • $_changed
  • $_hidden
  • $_id
  • +
  • $_isNew
  • $_key
  • $_rev
  • $_values
  • @@ -105,6 +109,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • Get the document id (if already known)
    getId()
  • Get the internal document id (if already known)
    getInternalId()
  • Get the internal document key (if already known)
    getInternalKey()
  • +
  • Get the isNew flag
    getIsNew()
  • Get the document key (if already known).
    getKey()
  • Get the document revision (if already known)
    getRevision()
  • Set a document attribute
    set()
  • @@ -81,6 +83,7 @@
  • Set the hidden attributes
    setHiddenAttributes()
  • Set the internal document id
    setInternalId()
  • Set the internal document key
    setInternalKey()
  • +
  • Set the isNew flag
    setIsNew()
  • Set the document revision
    setRevision()
  • Returns the document as JSON-encoded string
    toJson()
  • Returns the document as a serialized string
    toSerialized()
  • @@ -95,6 +98,7 @@
  • $_changed
  • $_hidden
  • $_id
  • +
  • $_isNew
  • $_key
  • $_rev
  • $_values
  • @@ -105,6 +109,7 @@
  • Replace an existing document in a collection, identified by the document itself
    replace()
  • Replace an existing document in a collection, identified by collection id and document id
    replaceById()
  • save a document to a collection
    save()
  • +
  • Store a document to a collection
    store()
  • Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document.
    update()
  • Update an existing document in a collection, identified by collection id and document id @@ -703,6 +705,59 @@

    $options

  • optional, prior to v1.2.0 this was a boolean value for create. Since v1.0.0 it's an array of options.
  • +

    Options are :
    +

  • 'create' - 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.
  • +

    + +

    Exceptions

    + + + +
    \triagens\ArangoDb\Exception
    +

    Returns

    +
    +mixed- id of document created
    + + +
    +

    Store a document to a collection

    +
    store(\triagens\ArangoDb\Document $document, mixed $collectionId, bool | array $options) : mixed
    +
    Inherited
    +
    +

    This is an alias/shortcut to save() and replace(). Instead of having to determine which of the 3 functions to use, +simply pass the document to store() and it will figure out which one to call.

    + +

    This will throw if the document cannot be saved or replaced.

    + + + + + + + + + +
    since1.0
    inherited_from\triagens\ArangoDb\DocumentHandler::store()
    +

    Parameters

    +
    +

    $document

    +\triagens\ArangoDb\Document
      +
    • the document to be added, can be passed as a document or an array
    • +
    +
    +
    +

    $collectionId

    +mixed
      +
    • collection id as string or number
    • +
    +
    +
    +

    $options

    +boolarray
      +
    • optional, prior to v1.2.0 this was a boolean value for create. Since v1.2.0 it's an array of options.
    • +
    +

    Options are :

  • 'create' - 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.
  • @@ -1202,7 +1257,7 @@

    example parameter

    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/deprecated.html b/docs/deprecated.html index eef9c88c..2a835487 100644 --- a/docs/deprecated.html +++ b/docs/deprecated.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • @@ -109,22 +110,22 @@ deprecated -194 +249 to be removed in version 2.0 - This function is being replaced by count() deprecated -236 +291 to be removed in version 2.0 - This function is being replaced by figures() deprecated -278 +333 to be removed in version 2.0 - This function is being replaced by create() deprecated -455 +645 to be removed in version 2.0 - This function is being replaced by drop()
    @@ -134,7 +135,7 @@
    + generated on 2013-05-01T19:06:48+03:00.
    diff --git a/docs/errors.html b/docs/errors.html index d58083f0..abba1256 100644 --- a/docs/errors.html +++ b/docs/errors.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • VertexHandler
  • Document
  • -
  • URLHelper
  • +
  • UrlHelper
  • Handler
  • Edge
  • Autoloader
  • User
  • -
  • URLs
  • +
  • Urls
  • AdminHandler
  • Cursor
  • GraphHandler
  • @@ -323,26 +324,26 @@

    Statement
    « More » -
    -

    URLHelper +
    +

    UpdatePolicy

    -

    Some helper methods to construct and process URLs

    +

    Document update policies

    -« More » +« More »
    -
    -

    URLs +
    +

    UrlHelper

    -

    Some basic URLs

    +

    Some helper methods to construct and process URLs

    -« More » +« More »
    -
    -

    UpdatePolicy +
    +

    Urls

    -

    Document update policies

    +

    Some basic URLs

    -« More » +« More »

    User @@ -387,7 +388,7 @@

    VertexHandler

    + generated on 2013-05-01T19:06:47+03:00.

    diff --git a/docs/packages/Default.html b/docs/packages/Default.html index 04567b41..62a4916e 100644 --- a/docs/packages/Default.html +++ b/docs/packages/Default.html @@ -23,6 +23,7 @@
  •  triagens
  • Packages
  •  ArangoDbPhpClient
  • +
  •  triagens
  • diff --git a/docs/structure.xml b/docs/structure.xml index b438337a..09c1f8d0 100644 --- a/docs/structure.xml +++ b/docs/structure.xml @@ -865,7 +865,7 @@ duplicate execution of the exit func.</p> - + ArangoDB PHP client: connection options @@ -931,190 +931,199 @@ It provides array access to its members.</p> + OPTION_ENHANCED_TRACE + OPTION_ENHANCED_TRACE + 'enhancedTrace' + + Enhanced trace + + + + OPTION_CREATE OPTION_CREATE 'createCollection' - + "Create collections if they don't exist" index constant - + OPTION_REVISION OPTION_REVISION 'rev' - + Update revision constant - + OPTION_UPDATE_POLICY OPTION_UPDATE_POLICY 'policy' - + Update policy index constant - + OPTION_UPDATE_KEEPNULL OPTION_UPDATE_KEEPNULL 'keepNull' - + Update keepnull constant - + OPTION_REPLACE_POLICY OPTION_REPLACE_POLICY 'policy' - + Replace policy index constant - + OPTION_DELETE_POLICY OPTION_DELETE_POLICY 'policy' - + Delete policy index constant - + OPTION_WAIT_SYNC OPTION_WAIT_SYNC 'waitForSync' - + Wait for sync index constant - + OPTION_LIMIT OPTION_LIMIT 'limit' - + Limit index constant - + OPTION_SKIP OPTION_SKIP 'skip' - + Skip index constant - + OPTION_BATCHSIZE OPTION_BATCHSIZE 'batchSize' - + Batch size index constant - + OPTION_JOURNAL_SIZE OPTION_JOURNAL_SIZE 'journalSize' - + Wait for sync index constant - + OPTION_IS_SYSTEM OPTION_IS_SYSTEM 'isSystem' - + Wait for sync index constant - + OPTION_IS_VOLATILE OPTION_IS_VOLATILE 'isVolatile' - + Wait for sync index constant - + OPTION_AUTH_USER OPTION_AUTH_USER 'AuthUser' - + Authentication user name - + OPTION_AUTH_PASSWD OPTION_AUTH_PASSWD 'AuthPasswd' - + Authentication password - + OPTION_AUTH_TYPE OPTION_AUTH_TYPE 'AuthType' - + Authentication type - + OPTION_CONNECTION OPTION_CONNECTION 'Connection' - + Connection - + OPTION_RECONNECT OPTION_RECONNECT 'Reconnect' - + Reconnect flag - + OPTION_BATCH OPTION_BATCH 'Batch' - + Batch flag - + OPTION_BATCHPART OPTION_BATCHPART 'BatchPart' - + Batchpart flag - + OPTION_CHECK_UTF8_CONFORM OPTION_CHECK_UTF8_CONFORM 'CheckUtf8Conform' - + UTF-8 CHeck Flag @@ -1141,196 +1150,196 @@ It provides array access to its members.</p> - + __construct __construct - + Set defaults, use options provided by client and validate them - + \triagens\ArangoDb\ClientException - + array - + void - + $options array - + getAll getAll - + Get all options - + array - + offsetSet offsetSet - + Set and validate a specific option, necessary for ArrayAccess - + \triagens\ArangoDb\Exception - + string - + mixed - + void - + $offset - + $value - + offsetExists offsetExists - + Check whether an option exists, necessary for ArrayAccess - + string - + bool - + $offset - + offsetUnset offsetUnset - + Remove an option and validate, necessary for ArrayAccess - + \triagens\ArangoDb\Exception - + string - + void - + $offset - + offsetGet offsetGet - + Get a specific option, necessary for ArrayAccess - + \triagens\ArangoDb\ClientException - + string - + mixed - + $offset - + getEndpoint getEndpoint - + Get the endpoint object for the connection - + \triagens\ArangoDb\ClientException - + \triagens\ArangoDb\Endpoint - + getDefaults getDefaults - + Get the default values for the options - + array - + getSupportedAuthTypes getSupportedAuthTypes - + Return the supported authorization types - + array - + getSupportedConnectionTypes getSupportedConnectionTypes - + Return the supported connection types - + array - + validate validate - + Validate the options - + \triagens\ArangoDb\ClientException - + void - + ArangoDB PHP client: statement @@ -1783,7 +1792,7 @@ provides the additional results.</p> - + ArangoDB PHP client: document handler @@ -1906,157 +1915,200 @@ appropriate HTTP requests to the server.</p> array - + getAllIds getAllIds - + Get the list of all documents' ids from a collection <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + array - + - + $collectionId - + getByExample getByExample - + Get document(s) by specifying an example <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + \triagens\ArangoDb\cursor - + - + $collectionId - + $document - + $options false - + add add - + Add a document to a collection <p>This will add the document to the collection and return the document's id</p> <p>This will throw if the document cannot be created</p> - + \triagens\ArangoDb\Exception - + mixed - + \triagens\ArangoDb\Document - + bool array - + mixed - + - + $collectionId - + + $document + + \triagens\ArangoDb\Document + + + $options + array() + + + + + store + store + + Store a document to a collection + <p>This is an alias/shortcut to save() and replace(). Instead of having to determine which of the 3 functions to use, +simply pass the document to store() and it will figure out which one to call.</p> + +<p>This will throw if the document cannot be saved or replaced.</p> + + \triagens\ArangoDb\Exception + + + \triagens\ArangoDb\Document + + + mixed + + + bool + array + + + mixed + + + + $document \triagens\ArangoDb\Document - + + $collectionId + null + + + $options array() - + save save - + save a document to a collection <p>This will add the document to the collection and return the document's id</p> <p>This will throw if the document cannot be saved</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + mixed - + - + $collectionId - + $document - + $options array() - + update update - + Update an existing document in a collection, identified by the including _id and optionally _rev in the patch document. <p>Attention - The behavior of this method has changed since version 1.1</p> @@ -2067,34 +2119,34 @@ appropriate HTTP requests to the server.</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 document to-be-replaced is the same as the one given.</p> - + \triagens\ArangoDb\Exception - + \triagens\ArangoDb\Document - + mixed - + bool - + $document \triagens\ArangoDb\Document - + $options array() - + updateById 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 <p>This will update the document on the server</p> @@ -2104,50 +2156,50 @@ Attention - The behavior of this method has changed since version 1.1 - + \triagens\ArangoDb\Exception - + mixed - + mixed - + \triagens\ArangoDb\Document - + mixed - + bool - + $collectionId - + $documentId - + $document \triagens\ArangoDb\Document - + $options array() - + replace replace - + Replace an existing document in a collection, identified by the document itself <p>This will update the document on the server</p> @@ -2156,34 +2208,34 @@ that the revision of the document to-be-updated is the same as the one given.< <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> - + \triagens\ArangoDb\Exception - + \triagens\ArangoDb\Document - + mixed - + bool - + $document \triagens\ArangoDb\Document - + $options array() - + replaceById replaceById - + Replace an existing document in a collection, identified by collection id and document id <p>This will update the document on the server</p> @@ -2192,261 +2244,261 @@ that the revision of the to-be-replaced document is the same as the one given.&l <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> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + \triagens\ArangoDb\Document - + mixed - + bool - + $collectionId - + $documentId - + $document \triagens\ArangoDb\Document - + $options array() - + delete delete - + Delete a document from a collection, identified by the document itself - + \triagens\ArangoDb\Exception - + \triagens\ArangoDb\Document - + mixed - + bool - + - + $document \triagens\ArangoDb\Document - + $options array() - + remove remove - + Remove a document from a collection, identified by the document itself - + \triagens\ArangoDb\Exception - + \triagens\ArangoDb\Document - + mixed - + bool - + $document \triagens\ArangoDb\Document - + $options array() - + deleteById deleteById - + Delete a document from a collection, identified by the collection id and document id - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + - + $collectionId - + $documentId - + $revision null - + $options array() - + removeById removeById - + Remove a document from a collection, identified by the collection id and document id - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + $collectionId - + $documentId - + $revision null - + $options array() - + getDocumentId getDocumentId - + Helper function to get a document id from a document or a document id value - + \triagens\ArangoDb\ClientException - + mixed - + mixed - + $document - + getRevision getRevision - + Helper function to get a document id from a document or a document id value - + \triagens\ArangoDb\ClientException - + mixed - + mixed - + $document - + getCollectionId getCollectionId - + Helper function to get a collection id from a document - + \triagens\ArangoDb\ClientException - + \triagens\ArangoDb\Document - + mixed - + $document \triagens\ArangoDb\Document @@ -2454,7 +2506,7 @@ that the revision of the to-be-replaced document is the same as the one given.&l - + ArangoDB PHP client: user document handler @@ -2668,23 +2720,23 @@ appropriate HTTP requests to the server.</p> - + removeUser removeUser - + Remove a user, identified by the username - + \triagens\ArangoDb\Exception - + mixed - + bool - + $username @@ -2692,7 +2744,7 @@ appropriate HTTP requests to the server.</p> - + ArangoDB PHP client: connection @@ -3064,203 +3116,203 @@ will restore it.</p> - + getVersion getVersion - + Get the client version (alias for getClientVersion) - + string - + getClientVersion getClientVersion - + Get the client version - + string - + stopCaptureBatch stopCaptureBatch - + Stop capturing commands - + array - + \triagens\ArangoDb\Batch - + $options array() - + getActiveBatch getActiveBatch - + returns the active batch - + setActiveBatch setActiveBatch - + Sets the active Batch for this connection - + \triagens\ArangoDb\Batch - + \triagens\ArangoDb\the - + $batch - + setCaptureBatch setCaptureBatch - + Sets the batch capture state (true, if capturing) - + boolean - + \triagens\ArangoDb\$state - + $state - + setBatchRequest setBatchRequest - + Sets connection into Batchrequest mode. <p>This is needed for some oprtations to act differently when in this mode</p> - + boolean - + $state - + getBatches getBatches - + returns the active batch - + doBatch doBatch - + This is a helper function to executeRequest that captures requests if we're in batch mode - + mixed - + string - + \triagens\ArangoDb\the - + $method - + $request - + detect_utf detect_utf - + This function checks that the encoding of a string is utf. <p>It only checks for printable characters.</p> - + array - + boolean - + $string - + check_encoding check_encoding - + This function checks that the encoding of the keys and values of the array are utf-8, recursively. <p>It will raise an exception if it encounters wrong encoded strings.</p> - + array - + $data - + json_encode_wrapper json_encode_wrapper - + This is a json_encode() wrapper that also checks if the data is utf-8 conform. <p>internally it calls the check_encoding() method. If that method does not throw an Exception, this method will happilly return the json_encoded data.</p> - + mixed - + mixed - + string - + $data - + $options null @@ -3268,53 +3320,224 @@ an Exception, this method will happilly return the json_encoded data.</p>< - - - ArangoDB PHP client: default values + + + ArangoDB PHP client: connection - - - + + + + - + - DefaultValues - \triagens\ArangoDb\DefaultValues + TraceRequest + \triagens\ArangoDb\TraceRequest - Contains default values used by the client + Class TraceRequest - + + - - DEFAULT_PORT - DEFAULT_PORT - 8529 - - Default port number (used if no port specified) + + $_headers + array() + + Stores each header as an array (key => value) element + + array + - - - DEFAULT_TIMEOUT - DEFAULT_TIMEOUT - 5 - - Default timeout value (used if no timeout value specified) + + + $_method + + + Stores the http method + + string + - - - DEFAULT_WAIT_SYNC - DEFAULT_WAIT_SYNC - false - - Default value for waitForSync (fsync all data to disk on document updates/insertions/deletions) + + + $_requestUrl + + + Stores the request url + + string + - - - DEFAULT_JOURNAL_SIZE - DEFAULT_JOURNAL_SIZE + + + $_body + + + Store the string of the body + + + string + + + + + $_type + "request" + + The http message type + + + string + + + + + __construct + __construct + + Set up the request trace + + + array + + + string + + + string + + + string + + + + $headers + + + + + $method + + + + + $requestUrl + + + + + $body + + + + + + getHeaders + getHeaders + + Get an array of the request headers + + + array + + + + + getMethod + getMethod + + Get the request method + + + string + + + + + getRequestUrl + getRequestUrl + + Get the request url + + + string + + + + + getBody + getBody + + Get the body of the request + + + string + + + + + getType + getType + + Get the http message type + + + string + + + + + + + + ArangoDB PHP client: default values + + + + + + + + DefaultValues + \triagens\ArangoDb\DefaultValues + + Contains default values used by the client + + + + + DEFAULT_PORT + DEFAULT_PORT + 8529 + + Default port number (used if no port specified) + + + + + DEFAULT_TIMEOUT + DEFAULT_TIMEOUT + 30 + + Default timeout value (used if no timeout value specified) + + + + + DEFAULT_WAIT_SYNC + DEFAULT_WAIT_SYNC + false + + Default value for waitForSync (fsync all data to disk on document updates/insertions/deletions) + + + + + DEFAULT_JOURNAL_SIZE + DEFAULT_JOURNAL_SIZE 33554432 Default value for collection journal size @@ -3567,7 +3790,7 @@ that occurred, this will return the server error string</p> - + ArangoDB PHP client: single document @@ -3586,73 +3809,172 @@ that occurred, this will return the server error string</p> - + + ENTRY_VERTICES + ENTRY_VERTICES + 'vertices' + + Graph vertices + + + + + ENTRY_EDGES + ENTRY_EDGES + 'edges' + + Graph edges + + + + + $_verticesCollection + null + + The collection used for vertices + + + string + + + + + $_edgesCollection + null + + The collection used for edges + + + string + + + + + __construct + __construct + + Constructs an empty graph + + + array + + + array + + + void + + + + $name + null + + + + $options + array() + array + + + setVerticesCollection setVerticesCollection - + Set the vertices-collection of the graph - + mixed - + \triagens\ArangoDb\Graph - + - + $verticesCollection - + getVerticesCollection getVerticesCollection - + Get the Vertices Collection of the graph - + string - + - + setEdgesCollection setEdgesCollection - + Set the edges-collection of the graph - + mixed - + \triagens\ArangoDb\Graph - + - + $edgesCollection - + getEdgesCollection getEdgesCollection - + Get the Edges Collection of the graph - + string - + + + set + set + + Set a graph attribute + <p>The key (attribute name) must be a string. +This will validate the value of the attribute and might throw an +exception if the value is invalid.</p> + + \triagens\ArangoDb\ClientException + + + string + + + mixed + + + void + + + + $key + + + + + $value + + + + - + ArangoDB PHP client: HTTP response @@ -3755,108 +4077,108 @@ that occurred, this will return the server error string</p> - + getHttpCode getHttpCode - + Return the HTTP status code of the response - + int - + getHeader getHeader - + Return an individual HTTP headers of the response - + string - + string - + $name - + getHeaders getHeaders - + Return the HTTP headers of the response - + array - + getLocationHeader getLocationHeader - + Return the location HTTP header of the response - + string - + getBody getBody - + Return the body of the response - + string - + getResult getResult - + Return the result line (first header line) of the response - + string - + getJson getJson - + Return the data from the JSON-encoded body - + \triagens\ArangoDb\ClientException - + array - + setupHeaders setupHeaders - + Set up an array of HTTP headers - + void - + ArangoDB PHP client: batchpart @@ -4160,13 +4482,13 @@ that occurred, this will return the server error string</p> - + getCursorOptions getCursorOptions - + Return an array of cursor options - + array @@ -4232,7 +4554,7 @@ that occurred, this will return the server error string</p> - + ArangoDB PHP client: collection handler @@ -4414,1011 +4736,1375 @@ appropriate HTTP requests to the server.</p> + OPTION_CAP_CONSTRAINT + OPTION_CAP_CONSTRAINT + 'cap' + + cap constraint option + + + + + OPTION_SIZE + OPTION_SIZE + 'size' + + size option + + + + + OPTION_GEO_INDEX + OPTION_GEO_INDEX + 'geo' + + geo index option + + + + + OPTION_IGNORE_NULL + OPTION_IGNORE_NULL + 'ignoreNull' + + ignoreNull option + + + + + OPTION_CONSTRAINT + OPTION_CONSTRAINT + 'constraint' + + constraint option + + + + + OPTION_GEOJSON + OPTION_GEOJSON + 'geoJson' + + geoJson option + + + + + OPTION_HASH_INDEX + OPTION_HASH_INDEX + 'hash' + + hash index option + + + + + OPTION_FULLTEXT_INDEX + OPTION_FULLTEXT_INDEX + 'fulltext' + + fulltext index option + + + + + OPTION_MIN_LENGTH + OPTION_MIN_LENGTH + 'minLength' + + minLength option + + + + + OPTION_SKIPLIST_INDEX + OPTION_SKIPLIST_INDEX + 'skiplist' + + skiplist index option + + + + OPTION_COUNT OPTION_COUNT 'count' - + count option - + OPTION_PROPERTIES OPTION_PROPERTIES 'properties' - + properties option - + OPTION_FIGURES OPTION_FIGURES 'figures' - + figures option - + OPTION_LOAD OPTION_LOAD 'load' - + load option - + OPTION_UNLOAD OPTION_UNLOAD 'unload' - + unload option - + OPTION_TRUNCATE OPTION_TRUNCATE 'truncate' - + truncate option - + OPTION_RENAME OPTION_RENAME 'rename' - + rename option - + + OPTION_EXCLUDE_SYSTEM + OPTION_EXCLUDE_SYSTEM + 'excludeSystem' + + exclude system collections + + + + get get - + Get information about a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + \triagens\ArangoDb\Collection - + $collectionId - + getProperties getProperties - + Get properties of a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + \triagens\ArangoDb\Collection - + $collectionId - + getCount getCount - + Get the number of documents in a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + int - + - + $collectionId - + count count - + Get the number of documents in a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + int - + $collectionId - + getFigures getFigures - + Get figures for a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + array - + - + $collectionId - + figures figures - + Get figures for a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + array - + $collectionId - + add add - + Adds a new collection on the server <p>This will add the collection on the server and return its id</p> <p>This will throw if the collection cannot be created</p> - + \triagens\ArangoDb\Exception - + \triagens\ArangoDb\Collection - + mixed - + - + $collection \triagens\ArangoDb\Collection - - create - create - - Creates a new collection on the server - <p>This will add the collection on the server and return its id -The id is mainly returned for backwards compatibility, but you should use the collection name for any reference to the collection. * -This will throw if the collection cannot be created</p> - - \triagens\ArangoDb\Exception - - - mixed + + create + create + + Creates a new collection on the server + <p>This will add the collection on the server and return its id +The id is mainly returned for backwards compatibility, but you should use the collection name for any reference to the collection. * +This will throw if the collection cannot be created</p> + + \triagens\ArangoDb\Exception + + + mixed + + + array + + + mixed + + + + $collection + + + + + $options + array() + + + + + createCapConstraint + createCapConstraint + + Create a cap constraint + + + string + + + int + + + + array + + + + $collectionId + + + + + $size + + + + + + createGeoIndex + createGeoIndex + + Create a geo index + + + string + + + array + + + boolean + + + boolean + + + boolean + + + + array + + + + $collectionId + + + + + $fields + + array + + + $geoJson + null + + + + $constraint + null + + + + $ignoreNull + null + + + + + createHashIndex + createHashIndex + + Create a hash index + + + string + + + array + + + boolean + + + + array + + + + $collectionId + + + + + $fields + + array + + + $unique + null + + + + + createFulltextIndex + createFulltextIndex + + Create a fulltext index + + + string + + + array + + + int + + + + array + + + + $collectionId + + + + + $fields + + array + + + $minLength + null + + + + + createSkipListIndex + createSkipListIndex + + Create a skip-list index + + + string - + array - - mixed + + bool + + + + array - - $collection + + $collectionId - - $options - array() + + $fields + + array + + + $unique + null - + index index - + Creates an index on a collection on the server <p>This will create an index on the collection on the server and return its id</p> <p>This will throw if the index cannot be created</p> - + \triagens\ArangoDb\Exception - + mixed - + string - + array - + bool - - mixed + + array + + + array - + $collectionId - + $type "" - + $attributes array() - + $unique false + + $indexOptions + array() + + + + + getIndex + getIndex + + Get the information about an index in a collection + + + string + + + string + + + array + + + + $collection + + + + + $indexId + + + - + getIndexes getIndexes - + Get indexes of a collection <p>This will throw if the collection cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + array - + $collectionId - + dropIndex dropIndex - + Drop an index - + \triagens\ArangoDb\Exception - + mixed - + bool - + $indexHandle - + delete delete - + Delete a collection - + \triagens\ArangoDb\Exception - + mixed - + bool - + - + $collection - + drop drop - + Drop a collection - + \triagens\ArangoDb\Exception - + mixed - + bool - + $collection - + rename rename - + Rename a collection - + \triagens\ArangoDb\Exception - + mixed - + string - + bool - + $collection - + $name - + load load - + Load a collection into the server's memory <p>This will load the given collection into the server's memory.</p> - + \triagens\ArangoDb\Exception - + mixed - + bool - + $collection - + unload unload - + Unload a collection from the server's memory <p>This will unload the given collection from the server's memory.</p> - + \triagens\ArangoDb\Exception - + mixed - + bool - + $collection - + truncate truncate - + Truncate a collection <p>This will remove all documents from the collection but will leave the metadata and indexes intact.</p> - + \triagens\ArangoDb\Exception - + mixed - + bool - + $collection - + byExample byExample - + Get document(s) by specifying an example <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + \triagens\ArangoDb\cursor - + $collectionId - + $document - + $options array() - + firstExample firstExample - + Get the first document matching a given example. <p>This will throw if the document cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + \triagens\ArangoDb\Document - + - + $collectionId - + $document - + $options array() - + + any + any + + Get a random document from the collection. + <p>This will throw if the document cannot be fetched from the server</p> + + \triagens\ArangoDb\Exception + + + mixed + + + \triagens\ArangoDb\Document + + + + + $collectionId + + + + + updateByExample updateByExample - + Update document(s) matching a given example <p>This will update the document(s) on the server</p> <p>This will throw if the document cannot be updated</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + - + $collectionId - + $example - + $newValue - + $options array() - + replaceByExample replaceByExample - + Replace document(s) matching a given example <p>This will replace the document(s) on the server</p> <p>This will throw if the document cannot be replaced</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + - + $collectionId - + $example - + $newValue - + $options array() - + removeByExample removeByExample - + Remove document(s) by specifying an example <p>This will throw on any error</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + int - + - + $collectionId - + $document - + $options array() - + range range - + Get document(s) by specifying range <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + string - + mixed - + mixed - + array - + array - + $collectionId - + $attribute - + $left - + $right - + $options array() - + near near - + Get document(s) by specifying near <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + double - + double - + array - + array - + $collectionId - + $latitude - + $longitude - + $options array() - + within within - + Get document(s) by specifying within <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + double - + double - + int - + array - + array - + $collectionId - + $latitude - + $longitude - + $radius - + $options array() - + getAllIds getAllIds - + Get the list of all documents' ids from a collection <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + array - + $collectionId - + isValidCollectionId isValidCollectionId - + Checks if the collectionId given, is valid. <p>Returns true if it is, or false if it is not.</p> - - + + bool - + $collectionId - + + getAllCollections + getAllCollections + + Get list of all available collections per default with the collection names as index. + <p>Returns empty array if none are available.</p> + + array + + + array + + + + $options + array() + + + + getCollectionId getCollectionId - + Gets the collectionId from the given collectionObject or string/integer - + mixed - + mixed - + $collection - + getCollectionName getCollectionName - + Gets the collectionId from the given collectionObject or string/integer - + mixed - + mixed - + $collection - + importFromFile importFromFile - + Import documents from a file <p>This will throw on all errors except insertion errors</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + array - + int - + $collectionId - + $importFileName - + $options array('createCollection' => false, 'type' => null) - + import import - + Import documents into a collection <p>This will throw on all errors except insertion errors</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + array - + int - + $collectionId - + $importData - + $options array('createCollection' => false, 'type' => null) @@ -5606,7 +6292,7 @@ the following endpoint types are currently supported (more to be added later): - + ArangoDB PHP client: single collection @@ -5623,96 +6309,159 @@ the following endpoint types are currently supported (more to be added later): - + ENTRY_ID ENTRY_ID 'id' - + Collection id index - + ENTRY_NAME ENTRY_NAME 'name' - + Collection name index - + ENTRY_TYPE ENTRY_TYPE 'type' - + Collection type index - + ENTRY_WAIT_SYNC ENTRY_WAIT_SYNC 'waitForSync' - + Collection 'waitForSync' index - + ENTRY_JOURNAL_SIZE ENTRY_JOURNAL_SIZE 'journalSize' - + Collection 'journalSize' index - + + ENTRY_STATUS + ENTRY_STATUS + 'status' + + Collection 'status' index + + + + + ENTRY_KEY_OPTIONS + ENTRY_KEY_OPTIONS + 'keyOptions' + + Collection 'keyOptions' index + + + + ENTRY_IS_SYSTEM ENTRY_IS_SYSTEM 'isSystem' - + Collection 'isSystem' index - + ENTRY_IS_VOLATILE ENTRY_IS_VOLATILE 'isVolatile' - + Collection 'isVolatile' sindex - + OPTION_PROPERTIES OPTION_PROPERTIES 'properties' - + properties option - + TYPE_DOCUMENT TYPE_DOCUMENT 2 - + document collection type - + TYPE_EDGE TYPE_EDGE 3 - + edge collection type + + STATUS_NEW_BORN + STATUS_NEW_BORN + 1 + + New born collection + + + + + STATUS_UNLOADED + STATUS_UNLOADED + 2 + + Unloaded collection + + + + + STATUS_LOADED + STATUS_LOADED + 3 + + Loaded collection + + + + + STATUS_BEING_UNLOADED + STATUS_BEING_UNLOADED + 4 + + Collectiong being unloaded + + + + + STATUS_DELETED + STATUS_DELETED + 5 + + Deleted collection + + + $_id null @@ -5790,364 +6539,452 @@ the following endpoint types are currently supported (more to be added later): - + + $_status + null + + The collection status value + + + int + + + + + $_keyOptions + null + + The collection keyOptions value + + + array + + + + __construct __construct - + Constructs an empty collection - + void - + createFromArray createFromArray - + Factory method to construct a new collection - + \triagens\ArangoDb\ClientException - + array - + \triagens\ArangoDb\Collection - + $values array - + getDefaultType getDefaultType - + Get the default collection type - + string - + __clone __clone - + Clone a collection <p>Returns the clone</p> - + void - + __toString __toString - + Get a string representation of the collection <p>Returns the collection as JSON-encoded string</p> - + string - + toJson toJson - + Returns the collection as JSON-encoded string - + string - + toSerialized toSerialized - + Returns the collection as a serialized string - + string - + getAll getAll - + Get all collection attributes - + array - + set set - + Set a collection attribute <p>The key (attribute name) must be a string.</p> <p>This will validate the value of the attribute and might throw an exception if the value is invalid.</p> - + \triagens\ArangoDb\ClientException - + string - + mixed - + void - + $key - + $value - + setId setId - + Set the collection id <p>This will throw if the id of an existing collection gets updated to some other id</p> - + \triagens\ArangoDb\ClientException - + mixed - + void - + $id - + getId getId - + Get the collection id (if already known) <p>Collection ids are generated on the server only.</p> <p>Collection ids are numeric but might be bigger than PHP_INT_MAX. To reliably store a collection id elsewhere, a PHP string should be used</p> - + mixed - + setName setName - + Set the collection name - + \triagens\ArangoDb\ClientException - + string - + void - + $name - + getName getName - + Get the collection name (if already known) - + string - + setType setType - + Set the collection type. <p>This is useful before a collection is create() 'ed in order to set a different type than the normal one. For example this must be set to 3 in order to create an edge-collection.</p> - + \triagens\ArangoDb\ClientException - + int - + void - + $type - + getType getType - + Get the collection type (if already known) - + string - + + setStatus + setStatus + + Set the collection status. + <p>This is useful before a collection is create()'ed in order to set a status.</p> + + \triagens\ArangoDb\ClientException + + + int + + + void + + + + $status + + + + + + getStatus + getStatus + + Get the collection status (if already known) + + + int + + + + + setKeyOptions + setKeyOptions + + Set the collection key options. + + + \triagens\ArangoDb\ClientException + + + array + + + void + + + + $keyOptions + + + + + + getKeyOptions + getKeyOptions + + Get the collection key options (if already known) + + + array + + + + setWaitForSync setWaitForSync - + Set the waitForSync value - + bool - + void - + $value - + getWaitForSync getWaitForSync - + Get the waitForSync value (if already known) - + bool - + setJournalSize setJournalSize - + Set the journalSize value - + bool - + void - + $value - + getJournalSize getJournalSize - + Get the journalSize value (if already known) - + bool - + setIsSystem setIsSystem - + Set the isSystem value - + bool - + void - + $value - + getIsSystem getIsSystem - + Get the isSystem value (if already known) - + bool - + setIsVolatile setIsVolatile - + Set the isVolatile value - + bool - + void - + $value - + getIsVolatile getIsVolatile - + Get the isVolatile value (if already known) - + bool - + ArangoDB PHP client: http helper methods @@ -6346,31 +7183,72 @@ For example this must be set to 3 in order to create an edge-collection.</p&g - + createConnection createConnection - + Create a one-time HTTP connection by opening a socket to the server <p>It is the caller's responsibility to close the socket</p> - + \triagens\ArangoDb\ConnectException - + \triagens\ArangoDb\ConnectionOptions - + resource - + $options \triagens\ArangoDb\ConnectionOptions + + parseHttpMessage + parseHttpMessage + + Splits a http message into its header and body. + + + string + + + \triagens\ArangoDb\ClientException + + + array + + + + $httpMessage + + + + + + parseHeaders + parseHeaders + + Process a string of HTTP headers into an array of header => values. + + + string + + + array + + + + $headers + + + + - + ArangoDB PHP client: vertex document handler @@ -6394,7 +7272,7 @@ appropriate HTTP requests to the server.</p> - + ArangoDB PHP client: single document @@ -6411,65 +7289,74 @@ appropriate HTTP requests to the server.</p> - + ENTRY_ID ENTRY_ID '_id' - + Document id index - + ENTRY_KEY ENTRY_KEY '_key' - + Document key index - + ENTRY_REV ENTRY_REV '_rev' - + Revision id index - + + ENTRY_ISNEW + ENTRY_ISNEW + '_isNew' + + isNew id index + + + + ENTRY_HIDDEN ENTRY_HIDDEN '_hidden' - + hidden atttribute index - + OPTION_WAIT_FOR_SYNC OPTION_WAIT_FOR_SYNC 'waitForSync' - + waitForSync option index - + OPTION_POLICY OPTION_POLICY 'policy' - + policy option index - + OPTION_KEEPNULL OPTION_KEEPNULL 'keepNull' - + keepNull option index @@ -6530,477 +7417,518 @@ appropriate HTTP requests to the server.</p> + $_isNew + true + + Flag to indicate whether document is a new document (never been saved to the server) + + + bool + + + + $_hidden array() - + Flag to indicate whether document was changed locally - + bool - + __construct __construct - + Constructs an empty document - + array - + void - + $options array() array - + createFromArray createFromArray - + Factory method to construct a new document using the values passed to populate it - + \triagens\ArangoDb\ClientException - + array - + array - + \triagens\ArangoDb\Document - + $values array - + $options array() array - + __clone __clone - + Clone a document <p>Returns the clone</p> - + void - + __toString __toString - + Get a string representation of the document. <p>It will not output hidden attributes.</p> <p>Returns the document as JSON-encoded string</p> - + string - + toJson toJson - + Returns the document as JSON-encoded string - + array - + string - + $options array() - + toSerialized toSerialized - + Returns the document as a serialized string - + array - + string - + $options array() - + filterHiddenAttributes filterHiddenAttributes - + Returns the attributes with the hidden ones removed - + array - + array - + $attributes - + set set - + Set a document attribute <p>The key (attribute name) must be a string. This will validate the value of the attribute and might throw an exception if the value is invalid.</p> - + \triagens\ArangoDb\ClientException - + string - + mixed - + void - + $key - + $value - + __set __set - + Set a document attribute, magic method <p>This is a magic method that allows the object to be used without declaring all document attributes first. This function is mapped to set() internally.</p> - + \triagens\ArangoDb\ClientException - + string - + mixed - + void - + $key - + $value - + get get - + Get a document attribute - + string - + mixed - + $key - + __get __get - + Get a document attribute, magic method <p>This function is mapped to get() internally.</p> - + string - + mixed - + $key - + getAll getAll - + Get all document attributes - + mixed - + array - + $options array() - + setHiddenAttributes setHiddenAttributes - + Set the hidden attributes - + array - + void - + $attributes array - + getHiddenAttributes getHiddenAttributes - + Get the hidden attributes - + array - + setChanged setChanged - + Set the changed flag - + bool - + void - + $value - + getChanged getChanged - + Get the changed flag - + + bool + + + + + setIsNew + setIsNew + + Set the isNew flag + + + bool + + + void + + + + $isNew + + + + + + getIsNew + getIsNew + + Get the isNew flag + + bool - + setInternalId setInternalId - + Set the internal document id <p>This will throw if the id of an existing document gets updated to some other id</p> - + \triagens\ArangoDb\ClientException - + string - + void - + $id - + setInternalKey setInternalKey - + Set the internal document key <p>This will throw if the key of an existing document gets updated to some other key</p> - + \triagens\ArangoDb\ClientException - + string - + void - + $key - + getInternalId getInternalId - + Get the internal document id (if already known) <p>Document ids are generated on the server only. Document ids consist of collection id and document id, in the format collectionid/documentid</p> - + string - + getInternalKey getInternalKey - + Get the internal document key (if already known) - + string - + getHandle getHandle - + Convenience function to get the document handle (if already known) - is an alias to getInternalId() <p>Document handles are generated on the server only. Document handles consist of collection id and document id, in the format collectionid/documentid</p> - + string - + getId getId - + Get the document id (if already known) <p>Document ids are generated on the server only. Document ids are numeric but might be bigger than PHP_INT_MAX. To reliably store a document id elsewhere, a PHP string should be used</p> - + mixed - + getKey getKey - + Get the document key (if already known). <p>Alias function for getInternalKey()</p> - + mixed - + getCollectionId getCollectionId - + Get the collection id (if already known) <p>Collection ids are generated on the server only. Collection ids are numeric but might be bigger than PHP_INT_MAX. To reliably store a collection id elsewhere, a PHP string should be used</p> - + mixed - + setRevision setRevision - + Set the document revision <p>Revision ids are generated on the server only.</p> <p>Document ids are numeric but might be bigger than PHP_INT_MAX. To reliably store a document id elsewhere, a PHP string should be used</p> - + mixed - + void - + $rev - + getRevision getRevision - + Get the document revision (if already known) - + mixed - + ArangoDB PHP client: URL helper methods @@ -7010,8 +7938,8 @@ To reliably store a document id elsewhere, a PHP string should be used</p> - URLHelper - \triagens\ArangoDb\URLHelper + UrlHelper + \triagens\ArangoDb\UrlHelper Some helper methods to construct and process URLs @@ -7074,47 +8002,47 @@ To reliably store a document id elsewhere, a PHP string should be used</p> - + appendParamsUrl appendParamsUrl - + Append parameters to a URL <p>Parameter values will be URL-encoded</p> - + string - + array - + string - + $baseUrl - + $params array - + getBoolString getBoolString - + Get a string from a boolean value - + mixed - + string - + $value @@ -7510,7 +8438,7 @@ exception if the value is invalid.</p> - + ArangoDB PHP client: document handler @@ -7723,100 +8651,100 @@ appropriate HTTP requests to the server.</p> - + edges edges - + Get edges for a given vertex - + \triagens\ArangoDb\Exception - + mixed - + mixed - + string - + array - + - + $collectionId - + $vertexHandle - + $direction 'any' - + inEdges inEdges - + Get inbound edges for a given vertex - + \triagens\ArangoDb\Exception - + mixed - + mixed - + array - + $collectionId - + $vertexHandle - + outEdges outEdges - + Get outbound edges for a given vertex - + \triagens\ArangoDb\Exception - + mixed - + mixed - + array - + $collectionId - + $vertexHandle @@ -7824,7 +8752,7 @@ appropriate HTTP requests to the server.</p> - + ArangoDB PHP client: autoloader @@ -7832,7 +8760,7 @@ appropriate HTTP requests to the server.</p> - + @@ -7861,58 +8789,224 @@ process classes from its own namespace and ignore all others.</p> Directory with library files - - string + + string + + + + + init + init + + Initialise the autoloader + + + \triagens\ArangoDb\Exception + + + void + + + + + load + load + + Handle loading of an unknown class + <p>This will only handle class from its own namespace and ignore all others.</p> + +<p>This allows multiple autoloaders to be used in a nested fashion.</p> + + string + + + void + + + + $className + + + + + + checkEnvironment + checkEnvironment + + Check the runtime environment + <p>This will check whether the runtime environment is compatible with the +Arango PHP client.</p> + + \triagens\ArangoDb\ClientException + + + void + + + + + + + + ArangoDB PHP client: connection + + + + + + + + + TraceResponse + \triagens\ArangoDb\TraceResponse + + Class TraceResponse + + + + + + $_headers + array() + + Stores each header as an array (key => value) element + + + array + + + + + $_httpCode + + + The http status code + + + int + + + + + $_body + + + The raw body of the response + + + string + + + + + $_type + "response" + + The type of http message + + + string + + + + + $_httpCodeDefinitions + array(100 => 'Continue', 101 => 'Switching Protocols', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported') + + Used to look up the definition for an http code + + + array - - init - init - - Initialise the autoloader + + __construct + __construct + + Set up the response trace - - \triagens\ArangoDb\Exception + + array - - void + + int - - - - load - load - - Handle loading of an unknown class - <p>This will only handle class from its own namespace and ignore all others.</p> - -<p>This allows multiple autoloaders to be used in a nested fashion.</p> - + string - - void - - - $className + + $headers + + + + + $httpCode + + + + + $body - - checkEnvironment - checkEnvironment - - Check the runtime environment - <p>This will check whether the runtime environment is compatible with the -Arango PHP client.</p> - + + getHeaders + getHeaders + + Get an array of the response headers + + + array + + + + + getHttpCode + getHttpCode + + Get the http response code + + + int + + + + + getHttpCodeDefinition + getHttpCodeDefinition + + Get the http code definition + + \triagens\ArangoDb\ClientException - - void + + string + + + + + getBody + getBody + + Get the response body + + + string + + + + + getType + getType + + Get the http message type + + + string @@ -7938,7 +9032,7 @@ Arango PHP client.</p> - + ArangoDB PHP client: Base URLs @@ -7948,8 +9042,8 @@ Arango PHP client.</p> - URLs - \triagens\ArangoDb\URLs + Urls + \triagens\ArangoDb\Urls Some basic URLs @@ -8082,161 +9176,170 @@ Arango PHP client.</p> + URL_ANY + URL_ANY + '/_api/simple/any' + + base URL part for any + + + + URL_REMOVE_BY_EXAMPLE URL_REMOVE_BY_EXAMPLE '/_api/simple/remove-by-example' - + base URL part for remove-by-example - + URL_UPDATE_BY_EXAMPLE URL_UPDATE_BY_EXAMPLE '/_api/simple/update-by-example' - + base URL part for update-by-example - + URL_REPLACE_BY_EXAMPLE URL_REPLACE_BY_EXAMPLE '/_api/simple/replace-by-example' - + base URL part for replace-by-example - + URL_IMPORT URL_IMPORT '/_api/import' - + base URL part for remove-by-example - + URL_RANGE URL_RANGE '/_api/simple/range' - + base URL part for select-range - + URL_NEAR URL_NEAR '/_api/simple/near' - + base URL part for select-range - + URL_WITHIN URL_WITHIN '/_api/simple/within' - + base URL part for select-range - + URL_BATCH URL_BATCH '/_api/batch' - + base URL part for batch processing - + URL_ADMIN_VERSION URL_ADMIN_VERSION '/_admin/version' - + base URL part for admin version - + URL_ADMIN_TIME URL_ADMIN_TIME '/_admin/time' - + base URL part for admin time - + URL_ADMIN_LOG URL_ADMIN_LOG '/_admin/log' - + base URL part for admin log - + URL_ADMIN_STATUS URL_ADMIN_STATUS '/_admin/status' - + base URL part for admin status - + URL_ADMIN_ROUTING_RELOAD URL_ADMIN_ROUTING_RELOAD '/_admin/routing/reload' - + base URL part for admin routing reload - + URL_ADMIN_MODULES_FLUSH URL_ADMIN_MODULES_FLUSH '/_admin/modules/flush' - + base URL part for admin modules flush - + URL_ADMIN_CONNECTION_STATISTICS URL_ADMIN_CONNECTION_STATISTICS '/_admin/connection-statistics' - + base URL part for admin connection statistics - + URL_ADMIN_REQUEST_STATISTICS URL_ADMIN_REQUEST_STATISTICS '/_admin/request-statistics' - + base URL part for admin request statistics - + URL_USER URL_USER '/_api/user' - + base URL part for user management - + ArangoDB PHP client: admin document handler @@ -8413,7 +9516,7 @@ The call returns statistics about the current and past requests. - + ArangoDB PHP client: result set cursor @@ -8592,226 +9695,226 @@ remaining results from the server.</p> array - + delete delete - + Explicitly delete the cursor <p>This might issue an HTTP DELETE request to inform the server about the deletion.</p> - + \triagens\ArangoDb\Exception - + bool - + getCount getCount - + Get the total number of results in the cursor <p>This might issue additional HTTP requests to fetch any outstanding results from the server</p> - + \triagens\ArangoDb\Exception - + int - + getAll getAll - + Get all results as an array <p>This might issue additional HTTP requests to fetch any outstanding results from the server</p> - + \triagens\ArangoDb\Exception - + array - + rewind rewind - + Rewind the cursor, necessary for Iterator - + void - + current current - + Return the current result row, necessary for Iterator - + array - + key key - + Return the index of the current result row, necessary for Iterator - + int - + next next - + Advance the cursor, necessary for Iterator - + void - + valid valid - + Check if cursor can be advanced further, necessary for Iterator <p>This might issue additional HTTP requests to fetch any outstanding results from the server</p> - + \triagens\ArangoDb\Exception - + bool - + add add - + Create an array of results from the input array - + array - + void - + $data array - + addFlatFromArray addFlatFromArray - + Create an array of results from the input array - + array - + void - + $data - array + - + addDocumentsFromArray addDocumentsFromArray - + Create an array of documents from the input array - + array - + void - + $data array - + sanitize sanitize - + Sanitize the result set rows <p>This will remove the _id and _rev attributes from the results if the "sanitize" option is set</p> - + array - + array - + $rows array - + fetchOutstanding fetchOutstanding - + Fetch outstanding results from the server - + \triagens\ArangoDb\Exception - + void - + updateLength updateLength - + Set the length of the (fetched) result set - + void - + getMetadata getMetadata - + Get MetaData of the current cursor - + array - + ArangoDB PHP client: graph handler @@ -8913,128 +10016,162 @@ appropriate HTTP requests to the server.</p> \triagens\ArangoDb\Graph - + + getGraph + getGraph + + Get a graph + <p>This will get a graph.</p> + +<p>This will throw if the graph cannot be retrieved.</p> + + \triagens\ArangoDb\Exception + + + string + + + array + + + \triagens\ArangoDb\Graph + + + + + + $graph + + + + + $options + array() + array + + + dropGraph dropGraph - + Drop a graph and remove all its vertices and edges, also drops vertex and edge collections - + \triagens\ArangoDb\Exception - + string - + bool - + - + $graph - + properties properties - + Get a graph's properties - + \triagens\ArangoDb\Exception - + string - + bool - + - + $graph - + saveVertex saveVertex - + save a vertex to a graph <p>This will add the vertex-document to the graph and return the vertex id</p> <p>This will throw if the vertex cannot be saved</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + - + $graphName - + $document - + getVertex getVertex - + Get a single vertex from a graph <p>This will throw if the vertex cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + string - + mixed - + array - + \triagens\ArangoDb\Document - + - + $graphName - + $vertexId - + $options array() array - + ReplaceVertex ReplaceVertex - + Replace an existing vertex in a graph, identified graph name and vertex id <p>This will update the vertex on the server</p> @@ -9043,51 +10180,51 @@ appropriate HTTP requests to the server.</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 vertex is the same as the one given.</p> - + \triagens\ArangoDb\Exception - + string - + mixed - + \triagens\ArangoDb\Document - + mixed - + bool - + - + $graphName - + $vertexId - + $document \triagens\ArangoDb\Document - + $options array() - + updateVertex updateVertex - + Update an existing vertex in a graph, identified by graph name and vertex id <p>This will update the vertex on the server</p> @@ -9096,194 +10233,194 @@ that the revision of the to-be-replaced vertex is the same as the one given.< <p>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.</p> - + \triagens\ArangoDb\Exception - + string - + mixed - + \triagens\ArangoDb\Document - + mixed - + bool - + - + $graphName - + $vertexId - + $document \triagens\ArangoDb\Document - + $options array() - + removeVertex removeVertex - + Remove a vertex from a graph, identified by the graph name and vertex id - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + - + $graphName - + $vertexId - + $revision null - + $options array() - + saveEdge saveEdge - + save an edge to a graph <p>This will save the edge to the graph and return the edges-document's id</p> <p>This will throw if the edge cannot be saved</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + mixed - + mixed - + - + $graphName - + $from - + $to - + $label null - + $document - + getEdge getEdge - + Get a single edge from a graph <p>This will throw if the edge cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + array - + \triagens\ArangoDb\Document - + - + $graphName - + $edgeId - + $options array() array - + ReplaceEdge ReplaceEdge - + Replace an existing edge in a graph, identified graph name and edge id <p>This will replace the edge on the server</p> @@ -9292,59 +10429,59 @@ that the revision of the to-be-replaced document is the same as the one given.&l <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 edge is the same as the one given.</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + \triagens\ArangoDb\Edge - + mixed - + bool - + - + $graphName - + $edgeId - + $label - + $document \triagens\ArangoDb\Edge - + $options array() - + updateEdge updateEdge - + Update an existing edge in a graph, identified by graph name and edge id <p>This will update the edge on the server</p> @@ -9353,175 +10490,175 @@ that the revision of the to-be-replaced edge is the same as the one given.</p <p>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.</p> - + \triagens\ArangoDb\Exception - + string - + mixed - + mixed - + \triagens\ArangoDb\Edge - + mixed - + bool - + - + $graphName - + $edgeId - + $label - + $document \triagens\ArangoDb\Edge - + $options array() - + removeEdge removeEdge - + Remove a edge from a graph, identified by the graph name and edge id - + \triagens\ArangoDb\Exception - + mixed - + mixed - + mixed - + mixed - + bool - + - + $graphName - + $edgeId - + $revision null - + $options array() - + getNeighborVertices getNeighborVertices - + Get neighboring vertices of a given vertex <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + \triagens\ArangoDb\cursor - + $graphName - + $vertexId - + $options array() - + getConnectedEdges getConnectedEdges - + Get connected edges of a given vertex <p>This will throw if the list cannot be fetched from the server</p> - + \triagens\ArangoDb\Exception - + mixed - + mixed - + bool array - + \triagens\ArangoDb\cursor - + $graphName - + $vertexId - + $options array() @@ -9531,6 +10668,9 @@ that the revision of the to-be-replaced document is the same as the one given.&l + + + From 1d8eb9c3434665731b3b61e67c323de67ff76b29 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 1 May 2013 19:16:40 +0300 Subject: [PATCH 3/5] Updated CHANGELOG --- CHANGELOG | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index cba7f947..52b86233 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,57 @@ +v1.2.1 (2013-05-01) +----------------------- + +# Contributors to this version: +# Francis Chuang (Github: @F21) +# Dorthe Luebbert (Github: @luebbert42) +# Jan Steemann (Github: @jsteemann) +# Frank Mayer (Github: @frankmayer) + + +* Implemented create functions for each index type. #87 + +* Upgrade to 1.2.2 for travis. + +* Added support for an enhanced tracer. #86 + +* Added keyOption and status support to collections. + +* Added support for the simple any query to retrieve a random document from a collection. + +* Added support for index options on index creation. + +* Added support for instantiating graphs by passing in a graph name to the constructor. Additionally added getGraph() support to the graph handler. + +* New method getAllCollections added + +* Moved spl_autoload_register to init() of the autoloader. + +* Updated DocumentHandler to include a convenience function store() that aliases add()/save() and replace(). + +* Updating and replacing documents, edges and vertices will now also update the revision of the document object. + +* Increased timeout for issue #55 + +* Timeout exception for issue #55 + +* Fixed bad encoding of empty arrays. + +* Fixed any() for empty collections. + +* Fixed formatting to psr2 standards. + +* Fixed fatal errors when AQL statement returns a non-array that cannot be turned into a document. + +* More PSR-2 Formatting + +* Updated README to include example of invoking the autoloader directly + +* Fixed some doc-block errors + + + + + v1.2.0 (2013-03-03) ----------------------- From 726666728e384eaba5e4f6872e118d48bad1775b Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 1 May 2013 19:26:02 +0300 Subject: [PATCH 4/5] Updated version info --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a98d2dc4..e459afa7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # ArangoDB-PHP - A PHP client for ArangoDB [![Build Status](https://travis-ci.org/triAGENS/ArangoDB-PHP.png?branch=devel)](https://travis-ci.org/triAGENS/ArangoDB-PHP) -**Version: 1.2.0** +**Version: 1.2.1** [Follow us on Twitter @arangodbphp to receive updates on the php driver](https://twitter.com/arangodbphp) @@ -29,7 +29,7 @@ - [More information](#more_info) -This version supports ArangoDB version 1.2.0 +This version supports ArangoDB versions 1.2.2 / 1.2.3 Please note that if you use other versions of ArangoDB, you must use a matching PHP driver version. From d1f93df079d59c6fdb2f6fbb6d1e83f2aa6d7bf1 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 1 May 2013 20:35:51 +0300 Subject: [PATCH 5/5] Removed Server interoperability and added link to interoperability matrix on wiki --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e459afa7..c021498a 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,9 @@ - [Requirements](#requirements) - [More information](#more_info) +
    -This version supports ArangoDB versions 1.2.2 / 1.2.3 - -Please note that if you use other versions of ArangoDB, you must use a matching PHP driver version. +Please take a look [here](https://github.com/triAGENS/ArangoDB-PHP/wiki/Important-versioning-information-on-ArangoDB-PHP#arangodb-php-client-to-arangodb-server-interoperability-matrix) for the **ArangoDB-PHP Client** / **ArangoDB Server** interoperability matrix. **[Important versioning information on ArangoDB-PHP](https://github.com/triAGENS/ArangoDB-PHP/wiki/Important-versioning-information-on-ArangoDB-PHP)** @@ -563,7 +562,8 @@ Here's the full code that combines all the pieces outlined above: # Requirements -* ArangoDB database server version 1.2 +* ArangoDB database server version 1.2 (detailed info [here](https://github.com/triAGENS/ArangoDB-PHP/wiki/Important-versioning-information-on-ArangoDB-PHP#arangodb-php-client-to-arangodb-server-interoperability-matrix)) + * PHP version 5.3 or higher (Travis-tested with 5.4 and 5.5)