db = $service->db; $this->cuid = $cuid = $service->token->uid; $this->isAdmin = $service->token->isAdmin; // We use the global $admin from AlternC legacy classes $this->admin = $admin; // Set the legacy rights: $this->admin->enabled = $this->isAdmin; } /** return a proper Alternc_Api_Response from an error class and error string * from AlternC legacy class */ protected function alterncLegacyErrorManager() { global $err; return new Alternc_Api_Response(array("code" => self::ERR_ALTERNC_FUNCTION, "message" => "[" . $err->clsid . "] " . $err->error)); } } /* Aternc_Api_Legacyobject */