ModuleClientMeta extends AppModel
Module Client Meta
Allows read/write data containing module or module row specific data for a particular client.
Table of Contents
Methods
| delete() | Delete a specific entry for a client and module |
| deleteAll() | Deletes all meta fields for a client and module |
| get() | Fetch a specific meta field |
| getAll() | Fetches all meta fields for a client |
| set() | Add or update module meta data for a particular client and module |
Methods
delete()
Delete a specific entry for a client and module
public
delete(int $client_id, string $key, int $module_id[, int $module_row_id = 0 ]) : mixed
Parameters
- $client_id : int
-
The ID of the client
- $key : string
-
The key to delete
- $module_id : int
-
The ID of the module
- $module_row_id : int = 0
-
The ID of the module row (if necessary)
deleteAll()
Deletes all meta fields for a client and module
public
deleteAll(int $client_id, int $module_id[, int $module_row_id = 0 ]) : mixed
Parameters
- $client_id : int
-
The ID of the client
- $module_id : int
-
The ID of the module
- $module_row_id : int = 0
-
The ID of the module row (if necessary)
get()
Fetch a specific meta field
public
get(int $client_id, string $key, int $module_id[, int $module_row_id = 0 ]) : mixed
Parameters
- $client_id : int
-
The ID of the client to fetch on
- $key : string
-
The key to fetch
- $module_id : int
-
The ID of the module
- $module_row_id : int = 0
-
The ID of the module row (if necessary)
Return values
mixed —A stdClass object representing the meta field, false if no such field exists
getAll()
Fetches all meta fields for a client
public
getAll(int $client_id, int $module_id[, int $module_row_id = 0 ]) : array<string|int, mixed>
Parameters
- $client_id : int
-
The ID of the client to fetch on
- $module_id : int
-
The ID of the module
- $module_row_id : int = 0
-
The ID of the module row (if necessary)
Return values
array<string|int, mixed> —An array of stdClass objects, each representing a meta field
set()
Add or update module meta data for a particular client and module
public
set(int $client_id, int $module_id[, int $module_row_id = 0 ][, array<string|int, mixed> $fields = [] ]) : mixed
Parameters
- $client_id : int
-
The ID of the client to set data for
- $module_id : int
-
The ID of the module
- $module_row_id : int = 0
-
The ID of the module row (if necessary)
- $fields : array<string|int, mixed> = []
-
A numerically indexed array of arrays, each containing:
- key The key to set
- value The value to set
- encrypted True to encrypt $value, false to store unencrypted, null to encrypt if currently set to encrypt (default null)