Added cache object to Model and cleaned up some variable names.
This commit is contained in:
parent
02c0eef632
commit
4b96d28bb7
3 changed files with 38 additions and 20 deletions
|
@ -34,6 +34,14 @@ class Model extends Object
|
|||
*/
|
||||
protected $db = null;
|
||||
|
||||
/**
|
||||
* Cache Object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $cache = null;
|
||||
|
||||
/**
|
||||
* SQL Array
|
||||
*
|
||||
|
@ -240,8 +248,9 @@ class Model extends Object
|
|||
// Runs the parent constructor so we have the config
|
||||
parent::__construct();
|
||||
|
||||
// Gets an instance of the database
|
||||
$this->db = Database::getInstance($this->datasource != '' ? $this->datasource : null);
|
||||
// Gets an instance of the cache and database
|
||||
$this->db = Database::getInstance($this->datasource != '' ? $this->datasource : null);
|
||||
$this->cache = Cache::getInstance();
|
||||
|
||||
// Builds out the query
|
||||
if ($type_or_parameters != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue