parseIdentifier.php
Table of Contents
Functions
- parseIdentifier() : array{collection: string|null, key: string|null}|null
- Parses an ArangoDB document handle (`<collection>/<key>`) into its components.
Functions
parseIdentifier()
Parses an ArangoDB document handle (`<collection>/<key>`) into its components.
parseIdentifier(string|null $id) : array{collection: string|null, key: string|null}|null
PHP mirror of the AQL function
PARSE_IDENTIFIER.
Useful when working with _id, _from or _to strings in PHP land
— e.g. when iterating through edge documents returned by a model
list() and only the _key or the collection name is needed.
Parameters
- $id : string|null
-
The full document handle (e.g.
"users/abc123").
Tags
Return values
array{collection: string|null, key: string|null}|null —An associative array with collection and key keys, or
null if $id is null / empty.