SoftaculousQueuedServices extends AppModel
SoftaculousQueuedServices model
Table of Contents
Methods
| __construct() | Constructor |
| add() | Adds a queued service |
| delete() | Attempts to remove a service from the queue |
| edit() | Edits a queued service |
| get() | Fetches queued service data |
| getAll() | Fetches a list of all queued services |
| getRules() | Fetches a list of rules for adding/editing a queued service |
Methods
__construct()
Constructor
public
__construct() : mixed
add()
Adds a queued service
public
add(array<string|int, mixed> $vars) : stdClass
Parameters
- $vars : array<string|int, mixed>
-
A list of input vars including:
- service_id The ID service on which the script is to be run
- company_id The ID of the company to which the service belongs
- errors The errors that caused this service to be queued
- attempts The number of times the queued installation has been attempted
Return values
stdClass —The stdClass object representing the newly-created queued script, or void on error
delete()
Attempts to remove a service from the queue
public
delete(int $service_id) : mixed
Parameters
- $service_id : int
-
The ID of the service to remove from the queue
edit()
Edits a queued service
public
edit(int $service_id, array<string|int, mixed> $vars) : stdClass
Parameters
- $service_id : int
-
The ID of the service for which to edit the queue
- $vars : array<string|int, mixed>
-
A list of input vars including:
- company_id The ID of the company to which the service belongs
- errors The errors that caused this service to be queued
- attempts The number of times the queued installation has been attempted
Return values
stdClass —The stdClass object representing the edited queued script, or void on error
get()
Fetches queued service data
public
get(int $service_id) : mixed
Parameters
- $service_id : int
-
The ID of the service for which to fetch queued data
Return values
mixed —An stdClass object representing the service queue, or false if none exist
getAll()
Fetches a list of all queued services
public
getAll(int $company_id) : array<string|int, mixed>
Parameters
- $company_id : int
-
The ID of the company whose queued services to fetch
Return values
array<string|int, mixed> —A list of stdClass objects, each representing a queued service
getRules()
Fetches a list of rules for adding/editing a queued service
private
getRules(array<string|int, mixed> $vars[, bool $edit = false ]) : mixed
Parameters
- $vars : array<string|int, mixed>
-
A list of input vars
- $edit : bool = false
-
True to get the edit rules, false for the add rules (optional, default false)