QVCI Library 3.1
 All Classes Namespaces Functions Variables
Public Member Functions | List of all members
Data_manager Class Reference

Public Member Functions

 __construct ()
 
 init ()
 
 get_models ()
 
 get_schema ()
 
 update_comments ()
 
 upgrade ($clean=false)
 
 verify ()
 

Detailed Description

Implements the data_manager class, which manages the model installation and upgrades.

Constructor & Destructor Documentation

Data_manager::__construct ( )

Constructor

Member Function Documentation

Data_manager::get_models ( )

Scan all model directories, starting with the application and then followed by autoload packages. Return an array containing the model names based on the names of the php files.

Returns
string[]
Data_manager::get_schema ( )

Get the complete schema from the _schema table in the database, with versions and dates. Returns an array of objects containing: id, table_name, version, modified

Returns
array
Data_manager::init ( )

Special one-time function when this library is being used for the first time.

Data_manager::update_comments ( )

Update the comments in the database from the schema files

Data_manager::upgrade (   $clean = false)

Perform an upgrade - or possibly a downgrade - it depends on the individual schemas.

Parameters
bool$cleanIndicates that obsolete tables should be deleted
Returns
bool to indicate success
Data_manager::verify ( )

Verify that the database structure agrees with the existing model schema files


The documentation for this class was generated from the following file: