Classes for request handlers has to implement the LudoDBService interface

The class also needs to implement a static function called getValidServices which returns an array of valid services, example array('read','save','delete'); Methods with these names also has to be implemented. "read", "save" and "delete" are already implemented for LudoDBModel.

package LudoDB
author Alf Magne Kalleland

 Methods

Return on success message for given service

getOnSuccessMessageFor(String $service) : String

Parameters

$service

String

Returns

String

Return array with names of valid services

getValidServices() : array

Returns

array

Return true to enable caching in LudoDBRequest handler for the read service.

shouldCache(string $service) : boolean

When true a serialized version of LudoDBModel::read will be stored in a caching table. When caching is enabled, you should also implement clearCache() to clear cache in case Data has been changed.

Parameters

$service

string

Returns

boolean

Returns true is passed arguments are acceptable for the constructor.

validateArguments(String $service, Array $arguments) : bool

Parameters

$service

String

$arguments

Array

Returns

bool

Validate data sent to service method

validateServiceData(string $service, array $data) : bool

Parameters

$service

string

$data

array

Returns

bool