class Method

Helper class to define webservice methods.

Methods

__construct(string $name)

Method constructor.

addInputParameter(string $parameter, string $type, bool|null $required = null, string|null $description = null, mixed $defaultValue = null, ParameterObject|null $parameterObject = null)

Adds an input parameter to the method definition.

addInputXQLParameterObject(ParameterObject $parameterObject = null)

No description

addOutputParameter(string $parameter, string $type, string|null $description = null, ParameterObject|null $parameterObject = null)

Adds an output parameter to the method definition.

array
execute(array $arguments = [])

Execute Method with argument supplied by the API

callable|null
getCallback()

No description

string|null
getDescription()

No description

string
getHttpMethod()

No description

array
getInputParameters()

No description

bool|null
getIsInternal()

No description

string
getName()

The name depends on the version. If a version bigger than 1 is set, the method name is suffixed with _v{$versionNumber}

array
getOutputParameters()

No description

string|null
getResource()

No description

string|null
getResourceId()

No description

int
getVersion()

No description

setCallback(callable|null $callback = null)

Instead of a defining a separate function in the service hook,

setDescription(string|null $description)

No description

setIsInternal(bool|null $isInternal)

No description

setName(string $name)

No description

setRestApiInfo(string $httpMethod = 'POST', string $resource = null, string $resourceId = null)

No description

setVersion(int $version)

No description

Details

at line 46
__construct(string $name)

Method constructor.

Parameters

string $name

at line 64
Method addInputParameter(string $parameter, string $type, bool|null $required = null, string|null $description = null, mixed $defaultValue = null, ParameterObject|null $parameterObject = null)

Adds an input parameter to the method definition.

Beware: The order of the parameters matters!

Parameters

string $parameter
string $type
bool|null $required
string|null $description
mixed $defaultValue
ParameterObject|null $parameterObject

If you use the type Method::OBJECT provide a definition of the object members

Return Value

Method

See also

Types for valid XSD type constants

at line 259
Method addInputXQLParameterObject(ParameterObject $parameterObject = null)

No description

Parameters

ParameterObject $parameterObject

Return Value

Method

at line 94
Method addOutputParameter(string $parameter, string $type, string|null $description = null, ParameterObject|null $parameterObject = null)

Adds an output parameter to the method definition.

Beware: The order of the parameters matters!

Parameters

string $parameter
string $type
string|null $description
ParameterObject|null $parameterObject

If you use the type Method::OBJECT provide a definition of the object members

Return Value

Method

See also

Types for valid XSD type constants

at line 178
array execute(array $arguments = [])

Execute Method with argument supplied by the API

Parameters

array $arguments

Return Value

array

at line 155
callable|null getCallback()

No description

Return Value

callable|null

at line 198
string|null getDescription()

No description

Return Value

string|null

at line 220
string getHttpMethod()

No description

Return Value

string

at line 78
array getInputParameters()

No description

Return Value

array

at line 254
bool|null getIsInternal()

No description

Return Value

bool|null

at line 115
string getName()

The name depends on the version. If a version bigger than 1 is set, the method name is suffixed with _v{$versionNumber}

Return Value

string

at line 106
array getOutputParameters()

No description

Return Value

array

at line 228
string|null getResource()

No description

Return Value

string|null

at line 236
string|null getResourceId()

No description

Return Value

string|null

at line 138
int getVersion()

No description

Return Value

int

at line 166
Method setCallback(callable|null $callback = null)

Instead of a defining a separate function in the service hook,

Parameters

callable|null $callback

Return Value

Method

at line 189
Method setDescription(string|null $description)

No description

Parameters

string|null $description

Return Value

Method

at line 245
Method setIsInternal(bool|null $isInternal)

No description

Parameters

bool|null $isInternal

Return Value

Method

at line 130
Method setName(string $name)

No description

Parameters

string $name

Return Value

Method

at line 210
Method setRestApiInfo(string $httpMethod = 'POST', string $resource = null, string $resourceId = null)

No description

Parameters

string $httpMethod
string $resource

e.g. user

string $resourceId

e.g. id

Return Value

Method

at line 147
Method setVersion(int $version)

No description

Parameters

int $version

If a version bigger than 1 is given, the function name is suffixed with _v{$versionNumber}

Return Value

Method