Arango PHP ODM

Vertex extends Document
in package

Represents an ArangoDB Vertex document

Tags
author

Lucas S. Vieira

Table of Contents

Methods

__construct()  : mixed
Document 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
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
toArray()  : array<string|int, mixed>
Returns a array representation of document

Methods

__construct()

Document constructor.

public __construct([array<string|int, mixed> $attributes = [] ][, Collection $collection = null ]) : mixed
Parameters
$attributes : array<string|int, mixed> = []

Document attributes

$collection : Collection = null

Collection to add this document

Tags
throws
InvalidParameterException

__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

__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
throws
DatabaseException|GuzzleException
Return values
bool

true if operation was successful, false otherwise

getCollection()

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
bool

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>|mixed
Tags
see
JsonSerializable::jsonSerialize()
Return values
array<string|int, mixed>|mixed

save()

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
throws
DatabaseException|InvalidParameterException|MissingParameterException
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

toArray()

Returns a array representation of document

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results