23 throw new \Exception(
"Bad argument: service is not an Alternc_Api_Service", self::ERR_INVALID_ARGUMENT);
26 $this->db = $service->db;
27 $this->
cuid = $cuid = $service->token->uid;
28 $this->isAdmin = $service->token->isAdmin;
48 if (isset($options[
"count"]))
49 $count = intval($options[
"count"]);
50 if (isset($options[
"offset"]))
51 $offset = intval($options[
"offset"]);
52 if ($offset != -1 || $count != -1) {
53 if ($offset < 0 || $offset > $max)
55 if ($count < 0 || $count > 1000)
58 return array($offset, $count);
Any Legacy AlternC Api should use this class as a parent to be able to handle properly the access rig...
alterncLegacyErrorManager()
return a proper Alternc_Api_Response from an error class and error string from AlternC legacy class
const ERR_INVALID_ARGUMENT
const ERR_ALTERNC_FUNCTION
offsetAndCount($options, $max)
ensure that offset & count are set properly from $options.
Standard Response object for the AlternC API.
Service API used by server to export API methods this class can be used to implement an API service /...