ModelMethod
class ModelMethod extends Method
Helper class to define webservice methods.
Properties
| protected Model | $model |
Methods
Method constructor.
Adds an input parameter to the method definition.
Adds an output parameter to the method definition.
Extract attachment information from InputArray
No description
The name depends on the version. If a version bigger than 1 is set, the method name is suffixed with _v{$versionNumber}
Add / Remove attachments for model
No description
Instead of a defining a separate function in the service hook,
No description
Details
at line 25
protected
__construct(string $name)
Method constructor.
in
Method 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!
in
Method at line 259
Method
addInputXQLParameterObject(ParameterObject $parameterObject = null)
No description
in
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!
at line 21
static ModelMethod
create(Model $model, string $methodType)
No description
in
Method at line 178
array
execute(array $arguments = [])
Execute Method with argument supplied by the API
at line 51
array
extractAttachmentInfoFromInputArray(array $inputData)
Extract attachment information from InputArray
at line 41
array
getAttachmentProperties()
No description
in
Method at line 155
callable|null
getCallback()
No description
in
Method at line 198
string|null
getDescription()
No description
in
Method at line 220
string
getHttpMethod()
No description
in
Method at line 78
array
getInputParameters()
No description
in
Method at line 254
bool|null
getIsInternal()
No description
in
Method 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}
in
Method at line 106
array
getOutputParameters()
No description
in
Method at line 228
string|null
getResource()
No description
in
Method at line 236
string|null
getResourceId()
No description
in
Method at line 138
int
getVersion()
No description
at line 68
void
processAttachmentProperties(DocumentModel $model, array $attachmentInfo = [])
Add / Remove attachments for model
at line 36
ModelMethod
setAttachmentProperties(array $properties)
No description
in
Method at line 166
Method
setCallback(callable|null $callback = null)
Instead of a defining a separate function in the service hook,