Abstract class for loading records from the DB.
More...
Abstract class for loading records from the DB.
- Copyright
- 2019 Ryan Wyllie ryan@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
mod_forum\local\vaults\db_table_vault::__construct |
( |
moodle_database | $db, |
|
|
entity_factory | $entityfactory, |
|
|
| $legacyfactory ) |
Constructor.
- Parameters
-
moodle_database | $db | A moodle database |
entity_factory | $entityfactory | Entity factory |
object | $legacyfactory | Legacy factory |
◆ from_db_records()
mod_forum\local\vaults\db_table_vault::from_db_records |
( |
array | $results | ) |
|
|
abstractprotected |
◆ generate_get_records_sql()
mod_forum\local\vaults\db_table_vault::generate_get_records_sql |
( |
string | $wheresql = null, |
|
|
string | $sortsql = null, |
|
|
?int | $userid = null ) |
|
abstractprotected |
◆ get_db()
mod_forum\local\vaults\db_table_vault::get_db |
( |
| ) |
|
|
protected |
Get the moodle database.
- Return values
-
◆ get_entity_factory()
mod_forum\local\vaults\db_table_vault::get_entity_factory |
( |
| ) |
|
|
protected |
Get the entity factory.
- Return values
-
◆ get_from_id()
mod_forum\local\vaults\db_table_vault::get_from_id |
( |
int | $id | ) |
|
Get the entity for the given id.
- Parameters
-
int | $id | Identifier for the entity |
- Return values
-
◆ get_from_ids()
mod_forum\local\vaults\db_table_vault::get_from_ids |
( |
array | $ids | ) |
|
Get the list of entities for the given ids.
- Parameters
-
- Return values
-
◆ get_legacy_factory()
mod_forum\local\vaults\db_table_vault::get_legacy_factory |
( |
| ) |
|
|
protected |
Get the legacy factory.
- Return values
-
◆ get_preprocessors()
mod_forum\local\vaults\db_table_vault::get_preprocessors |
( |
| ) |
|
|
protected |
Get the list of preprocessors to run on the DB record results.
The preprocessors should be defined using an associative array. The key used to identify the preprocessor in this list will be used to identify the value of that preprocessor in the list of results when passed to the from_db_records function.
- Return values
-
Reimplemented in mod_forum\local\vaults\discussion_list, and mod_forum\local\vaults\forum.
◆ get_table_alias()
mod_forum\local\vaults\db_table_vault::get_table_alias |
( |
| ) |
|
|
abstractprotected |
◆ transform_db_records_to_entities()
mod_forum\local\vaults\db_table_vault::transform_db_records_to_entities |
( |
array | $records | ) |
|
|
protected |
Execute the defined preprocessors on the DB record results and then convert them into entities.
- Parameters
-
stdClass[] | $records | List of DB results |
- Return values
-
The documentation for this class was generated from the following file:
- mod/forum/classes/local/vaults/db_table_vault.php