Menu

## AQLFunction
in package
implements EntityInterface

AQLFunction.php : 19

Represents a user defined AQL function on server.

##### Tags

author

  Lucas S. Vieira

### Table of Contents

#### Interfaces

EntityInterface
  Entity interface.

#### Methods

__construct() : mixed
  AQLFunction constructor.
delete() : bool
  Removes an AQL function from server, if possible
getCode() : string
  Returns the AQL function code.
getDeletionData() : array<string|int, mixed>
  If the object has performed a delete operation, this method will return the deletion data.
getName() : string
  Returns the AQL function name.
hasConnection() : bool
  If this AQL function has a connection set or not.
isDeterministic() : bool
  Indicates if the function results are deterministic. <br>
isNew() : bool
  If the AQLFunction object is a new created AQLFunction (and not exists on server) <br> or if it is a representation of an existing one.
jsonSerialize() : array<string|int, mixed>|mixed
  Return a JSON representation of AQL function object.
save() : bool
  Saves the AQL function on server.
setConnection() : mixed
  Sets a connection to use.
toArray() : array<string|int, mixed>
  Returns a array representation of AQL function object.

### Methods

#### __construct()

AQLFunction.php : 62

AQLFunction constructor.

`public __construct(string $name, string $code[, Connection|null $connection = null ][, bool $isDeterministic = true ][, bool $isNew = true ]) : mixed`

##### Parameters

$name : string

  The AQL function name.

$code : string

  The AQL function code.

$connection : Connection|null = null

  Connection object to use.

$isDeterministic : bool = true

  Indicates if the function results are deterministic.

$isNew : bool = true

  Indicates if the function object is a new one or not.

#### delete()

AQLFunction.php : 173

Removes an AQL function from server, if possible

`public delete() : bool`

##### Tags

throws
  ServerException|GuzzleException

##### Return values

bool —

True if operation was successful, false otherwise

#### getCode()

AQLFunction.php : 97

Returns the AQL function code.

`public getCode() : string`

##### Return values

string

#### getDeletionData()

AQLFunction.php : 117

If the object has performed a delete operation, this method will return the deletion data.

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

##### Return values

array<string|int, mixed>

#### getName()

AQLFunction.php : 87

Returns the AQL function name.

`public getName() : string`

##### Return values

string

#### hasConnection()

AQLFunction.php : 127

If this AQL function has a connection set or not.

`public hasConnection() : bool`

##### Return values

bool —

True if it has a connection object. False otherwise.

#### isDeterministic()

AQLFunction.php : 107

Indicates if the function results are deterministic. <br>

`public isDeterministic() : bool`

##### Return values

bool

#### isNew()

AQLFunction.php : 77

If the AQLFunction object is a new created AQLFunction (and not exists on server) <br> or if it is a representation of an existing one.

`public isNew() : bool`

##### Return values

bool

#### jsonSerialize()

AQLFunction.php : 210

Return a JSON representation of AQL function object.

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

##### Return values

array<string|int, mixed>|mixed

#### save()

AQLFunction.php : 149

Saves the AQL function on server.

`public save() : bool`

##### Tags

throws
  ServerException|GuzzleException

##### Return values

bool —

True if operation was successful, false otherwise.

#### setConnection()

AQLFunction.php : 137

Sets a connection to use.

`public setConnection(Connection $connection) : mixed`

##### Parameters

$connection : Connection

  Connection object to use.

#### toArray()

AQLFunction.php : 196

Returns a array representation of AQL function object.

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

##### Return values

array<string|int, mixed>

## Search results