Forum vault class.  
 More...
Forum vault class. 
This should be the only place that accessed the database.
This uses the repository pattern. See: https://designpatternsphp.readthedocs.io/en/latest/More/Repository/README.html
- 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 
◆ from_db_records()
  
  | 
        
          | mod_forum\local\vaults\forum::from_db_records | ( | array | $results | ) |  |  | protected | 
 
 
◆ generate_get_records_sql()
  
  | 
        
          | mod_forum\local\vaults\forum::generate_get_records_sql | ( | string | $wheresql = null, |  
          |  |  | string | $sortsql = null, |  
          |  |  | ?int | $userid = null ) |  | protected | 
 
Build the SQL to be used in get_records_sql. 
- Parameters
- 
  
    | string | null | $wheresql | Where conditions for the SQL |  | string | null | $sortsql | Order by conditions for the SQL |  | int | null | $userid | The user ID |  
 
- Return values
- 
  
  
Reimplemented from mod_forum\local\vaults\db_table_vault.
 
 
◆ get_db()
  
  | 
        
          | mod_forum\local\vaults\db_table_vault::get_db | ( |  | ) |  |  | protectedinherited | 
 
Get the moodle database. 
- Return values
- 
  
  
 
 
◆ get_entity_factory()
  
  | 
        
          | mod_forum\local\vaults\db_table_vault::get_entity_factory | ( |  | ) |  |  | protectedinherited | 
 
Get the entity factory. 
- Return values
- 
  
  
 
 
◆ get_from_course_module_id()
      
        
          | mod_forum\local\vaults\forum::get_from_course_module_id | ( | int | $id | ) |  | 
      
 
Get the forum for the given course module id. 
- Parameters
- 
  
    | int | $id | The course module id |  
 
- Return values
- 
  
  
 
 
◆ get_from_course_module_ids()
      
        
          | mod_forum\local\vaults\forum::get_from_course_module_ids | ( | array | $ids | ) |  | 
      
 
Get the forums for the given course module ids. 
- Parameters
- 
  
    | int[] | $ids | The course module ids |  
 
- Return values
- 
  
  
 
 
◆ get_from_id()
  
  | 
        
          | mod_forum\local\vaults\db_table_vault::get_from_id | ( | int | $id | ) |  |  | inherited | 
 
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 | ) |  |  | inherited | 
 
Get the list of entities for the given ids. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_from_post_id()
      
        
          | mod_forum\local\vaults\forum::get_from_post_id | ( | int | $id | ) |  | 
      
 
Get the forum entity for the given post id. 
- Parameters
- 
  
    | int | $id | The course module id |  
 
- Return values
- 
  
  
 
 
◆ get_legacy_factory()
  
  | 
        
          | mod_forum\local\vaults\db_table_vault::get_legacy_factory | ( |  | ) |  |  | protectedinherited | 
 
Get the legacy factory. 
- Return values
- 
  
  
 
 
◆ get_preprocessors()
  
  | 
        
          | mod_forum\local\vaults\forum::get_preprocessors | ( |  | ) |  |  | protected | 
 
 
◆ get_table_alias()
  
  | 
        
          | mod_forum\local\vaults\forum::get_table_alias | ( |  | ) |  |  | protected | 
 
 
◆ transform_db_records_to_entities()
  
  | 
        
          | mod_forum\local\vaults\db_table_vault::transform_db_records_to_entities | ( | array | $records | ) |  |  | protectedinherited | 
 
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: