ENTRY_NAME
ENTRY_NAME
Collections index
Provides management of user-functions
AqlUserFunction object
An AqlUserFunction is an object that is used to manage AQL User Functions.
It registers, unregisters and lists user functions on the server
The object encapsulates:
The object requires the connection object and can be initialized
with or without initial configuration.
Any configuration can be set and retrieved by the object's methods like this:
$this->setName('myFunctions:myFunction');
$this->setCode('function (){your code};');
or like this:
$this->name('myFunctions:myFunction');
$this->code('function (){your code};');
$_connection : \triagens\ArangoDb\Connection
The connection object
__construct(\triagens\ArangoDb\Connection $connection, array $attributesArray) : \triagens\ArangoDb\AqlUserFunction
Initialise the AqlUserFunction object
The $attributesArray array can be used to specify the name and code for the user function in form of an array.
Example: array( 'name' => 'myFunctions:myFunction', 'code' => 'function (){}' )
\triagens\ArangoDb\Connection | $connection |
|
array | $attributesArray |
|
register(null $name, null $code) : mixed
Registers the user function
If no parameters ($name,$code) are passed, it will use the properties of the object.
If $name and/or $code are passed, it will override the object's properties with the passed ones
null | $name | |
null | $code |
throws exception if registration failed
true if registration was successful.
unregister(string $name, boolean $namespace) : mixed
Unregister the user function
If no parameter ($name) is passed, it will use the property of the object.
If $name is passed, it will override the object's property with the passed one
string | $name | |
boolean | $namespace |
throw exception if the request fails
true if successful without a return value or the return value if one was set in the action
getRegisteredUserFunctions(null $namespace) : mixed
Get registered user functions
The method can optionally be passed a $namespace parameter to narrow the results down to a specific namespace.
null | $namespace |
throw exception if the request failed
true if successful without a return value or the return value if one was set in the action
getConnection() : \triagens\ArangoDb\Connection
Return the connection object