class ApiService extends Service

Properties

AdministrationController $mod
array $_hook_info

Hook Information "id" => "4914" "instance_id" => "api_microsoft" "name" => "oauth_client" "hook" => "webservice.oauth_client" "type" => "object" "registry_name" => "oauth_client" "function_name" => "" "internal" => "no" "dep_mode" => "local" "active" => "yes" "title" => "Basic functions" "description" => "" "options" => ""

from  BaseHook
protected bool $isInternal from  Service

Methods

mixed
__call(string $name, array $arguments = [])

Checks if a callback is defined on the Method and calls it.

from  Service
bool
change_login($old_login, $new_login)

Change Login

static Method
createMethod(string $methodName)

Create new service method

from  Service
array
create_user(string $login, string $email, string $firstname, string $lastname, null $displayname = null, bool|string $password = false, bool $force_password_change = true, int $security_group = 2)

Create User

string
getHookDescription()

No description

from  BaseHook
string
getHookIdentifier()

Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name

from  BaseHook
array
getHookInfoValue(bool $key = false)

Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)

from  BaseHook
string
getHookInstance()

No description

from  BaseHook
string
getHookName()

No description

from  BaseHook
string
getHookTitle()

No description

from  BaseHook
string
getJsonRpcResponse(array|object $data, int $requestId = null)

No description

from  Service
Method|null
getMethod(string $name)

Get Service Method

from  Service
callable|null
getMethodCallback(string $name)

Returns the callback of a method if it is defined.

from  Service
getObject()

No description

from  BaseHook
mixed
getOption(string $key)

Returns the option with $key set in the config.yml

from  BaseHook
get_service_description()

Returns the registered webservice methods.

from  Service
init()

Initialization after construction with access to $this->mod

from  Service
bool
isAvailable()

Returns true if this hook is available otherwise false.

from  Service
bool
isInternal()

No description

from  Service
array
list_module_group_security($user_id = false)

List all available security groups

array
list_security_groups()

List all available security groups

list_users($query = false, $start = 0, $limit = 100)

No description

array
setupMethods()

Define and return your webservice methods.

bool
update_user(string $login, $new_login = null, bool|string $email = false, bool|string $firstname = false, bool|string $lastname = false, null $displayname = null, bool $password = false, bool $force_password_change = true, mixed $security_group = false, $security_group_add = null, $security_group_remove = null, string $status = 'active', bool|string $memo = false)

Update User

Details

in Service at line 127
mixed __call(string $name, array $arguments = [])

Checks if a callback is defined on the Method and calls it.

Parameters

string $name
array $arguments

Return Value

mixed

Exceptions

RuntimeException

See also

Method::setCallback

at line 435
bool change_login($old_login, $new_login)

Change Login

Parameters

$old_login
$new_login

Return Value

bool

Exceptions

Exception

in Service at line 238
static protected Method createMethod(string $methodName)

Create new service method

Parameters

string $methodName

Return Value

Method

at line 304
array create_user(string $login, string $email, string $firstname, string $lastname, null $displayname = null, bool|string $password = false, bool $force_password_change = true, int $security_group = 2)

Create User

Parameters

string $login
string $email
string $firstname
string $lastname
null $displayname
bool|string $password
bool $force_password_change
int $security_group

Return Value

array

Exceptions

UserCreationException

in BaseHook at line 76
string getHookDescription()

No description

Return Value

string

in BaseHook at line 55
string getHookIdentifier()

Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name

Return Value

string

in BaseHook at line 45
array getHookInfoValue(bool $key = false)

Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)

Parameters

bool $key

Return Value

array

in BaseHook at line 69
string getHookInstance()

No description

Return Value

string

in BaseHook at line 62
string getHookName()

No description

Return Value

string

in BaseHook at line 83
string getHookTitle()

No description

Return Value

string

in Service at line 222
string getJsonRpcResponse(array|object $data, int $requestId = null)

No description

Parameters

array|object $data
int $requestId

Return Value

string

in Service at line 154
Method|null getMethod(string $name)

Get Service Method

Parameters

string $name

Return Value

Method|null

in Service at line 143
callable|null getMethodCallback(string $name)

Returns the callback of a method if it is defined.

Parameters

string $name

Method name

Return Value

callable|null

in BaseHook at line 88
getObject()

No description

in BaseHook at line 97
mixed getOption(string $key)

Returns the option with $key set in the config.yml

Parameters

string $key

Return Value

mixed

in Service at line 182
get_service_description()

Returns the registered webservice methods.

See also

setupMethods Please use setupMethods to define and return your webservice methods.

Examples

[
  'hello' => [
     'input'  => ['name'     => 'string],
     'output' => ['greeting' => 'string],
]

in Service at line 167
init()

Initialization after construction with access to $this->mod

in Service at line 213
bool isAvailable()

Returns true if this hook is available otherwise false.

Return Value

bool

in Service at line 245
bool isInternal()

No description

Return Value

bool

at line 603
array list_module_group_security($user_id = false)

List all available security groups

Parameters

$user_id

Return Value

array

at line 582
array list_security_groups()

List all available security groups

Return Value

array

at line 478
list_users($query = false, $start = 0, $limit = 100)

No description

Parameters

$query
$start
$limit

at line 26
array setupMethods()

Define and return your webservice methods.

Return Value

array

at line 353
bool update_user(string $login, $new_login = null, bool|string $email = false, bool|string $firstname = false, bool|string $lastname = false, null $displayname = null, bool $password = false, bool $force_password_change = true, mixed $security_group = false, $security_group_add = null, $security_group_remove = null, string $status = 'active', bool|string $memo = false)

internal  param $string /bool $password
 

Update User

Parameters

string $login
$new_login
bool|string $email
bool|string $firstname
bool|string $lastname
null $displayname
bool $password
bool $force_password_change
mixed $security_group
$security_group_add
$security_group_remove
string $status ['active','no_login','disabled']
bool|string $memo

Return Value

bool

Exceptions

Exception