Edge
extends Document
in package
Represents an ArangoDB Edge document
Tags
Table of Contents
Methods
- __construct() : mixed
- Edge constructor.
- __get() : mixed|null
- Get some attribute.
- __isset() : bool
- Verifies if an attribute is set on document
- __set() : mixed
- Set a attribute
- __toString() : string
- Return a string representation of document.
- __unset() : mixed
- Unset the given attribute of document
- delete() : bool
- Removes a document on server, if possible
- from() : Vertex|false
- Return the '_from' document
- getCollection() : Collection|null
- Returns the document collection
- getId() : string|null
- Returns the document Id
- getKey() : string|null
- Returns the document key
- getRevision() : string|null
- Returns the document revision
- isNew() : bool
- Returns true if is a new object
- jsonSerialize() : array<string|int, mixed>|mixed
- save() : bool
- Save or update the document, if possible
- setCollection() : void
- Sets the collection to add this document
- to() : Vertex|false
- Return the '_to' document
- toArray() : array<string|int, mixed>
- Returns a array representation of document
Methods
__construct()
Edge constructor.
public
__construct([array<string|int, mixed> $attributes = [] ][, Collection|null $collection = null ]) : mixed
Parameters
- $attributes : array<string|int, mixed> = []
- $collection : Collection|null = null
Tags
__get()
Get some attribute.
public
__get(string $name) : mixed|null
Parameters
- $name : string
-
Attribute name.
Return values
mixed|null —Attribute value.
__isset()
Verifies if an attribute is set on document
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
Set a attribute
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
Tags
__toString()
Return a string representation of document.
public
__toString() : string
Return values
string__unset()
Unset the given attribute of document
public
__unset(string $name) : mixed
Parameters
- $name : string
delete()
Removes a document on server, if possible
public
delete() : bool
Tags
Return values
bool —true if operation was successful, false otherwise
from()
Return the '_from' document
public
from() : Vertex|false
Tags
Return values
Vertex|falsegetCollection()
Returns the document collection
public
getCollection() : Collection|null
Return values
Collection|null —Collection object if is set. Null otherwise.
getId()
Returns the document Id
public
getId() : string|null
Return values
string|null —String if document already exists. Null otherwise (e.g. a new document)
getKey()
Returns the document key
public
getKey() : string|null
Return values
string|null —String if document already exists. Null otherwise (e.g. a new document)
getRevision()
Returns the document revision
public
getRevision() : string|null
Return values
string|null —String if document already exists. Null otherwise (e.g. a new document)
isNew()
Returns true if is a new object
public
isNew() : bool
Return values
booljsonSerialize()
public
jsonSerialize() : array<string|int, mixed>|mixed
Tags
Return values
array<string|int, mixed>|mixedsave()
Save or update the document, if possible
public
save([array<string|int, mixed> $options = [] ]) : bool
Parameters
- $options : array<string|int, mixed> = []
-
Optional array of options. Only used on update operations.
Tags
Return values
bool —true if operation was successful. Throws an exceptions otherwise
setCollection()
Sets the collection to add this document
public
setCollection(Collection $collection) : void
Parameters
- $collection : Collection
to()
Return the '_to' document
public
to() : Vertex|false
Tags
Return values
Vertex|falsetoArray()
Returns a array representation of document
public
toArray() : array<string|int, mixed>