Menu

## Edge extends Document
in package

Edge.php : 20

Represents an ArangoDB Edge document

##### Tags

author

  Lucas S. Vieira

### 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.php : 51

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

throws
  InvalidParameterException|MissingParameterException

#### __get()

Document.php : 155

Get some attribute.

`public __get(string $name) : mixed|null`

##### Parameters

$name : string

  Attribute name.

##### Return values

mixed|null —

Attribute value.

#### __isset()

Document.php : 188

Verifies if an attribute is set on document

`public __isset(string $name) : bool`

##### Parameters

$name : string

##### Return values

bool

#### __set()

Document.php : 172

Set a attribute

`public __set(string $name, mixed $value) : mixed`

##### Parameters

$name : string
$value : mixed

##### Tags

throws
  InvalidParameterException

#### __toString()

Document.php : 143

Return a string representation of document.

`public __toString() : string`

##### Return values

string

#### __unset()

Document.php : 198

Unset the given attribute of document

`public __unset(string $name) : mixed`

##### Parameters

$name : string

#### delete()

Document.php : 323

Removes a document on server, if possible

`public delete() : bool`

##### Tags

throws
  DatabaseException|GuzzleException

##### Return values

bool —

true if operation was successful, false otherwise

#### from()

Edge.php : 82

Return the '_from' document

`public from() : Vertex|false`

##### Tags

throws
  InvalidParameterException|MissingParameterException|DatabaseException|GuzzleException

##### Return values

Vertex|false

#### getCollection()

Document.php : 248

Returns the document collection

`public getCollection() : Collection|null`

##### Return values

Collection|null —

Collection object if is set. Null otherwise.

#### getId()

Document.php : 218

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()

Document.php : 228

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()

Document.php : 238

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()

Document.php : 208

Returns true if is a new object

`public isNew() : bool`

##### Return values

bool

#### jsonSerialize()

Document.php : 357
`public jsonSerialize() : array<string|int, mixed>|mixed`

##### Tags

see
  JsonSerializable::jsonSerialize()

##### Return values

array<string|int, mixed>|mixed

#### save()

Document.php : 271

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()

Document.php : 258

Sets the collection to add this document

`public setCollection(Collection $collection) : void`

##### Parameters

$collection : Collection

#### to()

Edge.php : 71

Return the '_to' document

`public to() : Vertex|false`

##### Tags

throws
  InvalidParameterException|MissingParameterException|DatabaseException|GuzzleException

##### Return values

Vertex|false

#### toArray()

Document.php : 344

Returns a array representation of document

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

##### Return values

array<string|int, mixed>

## Search results