2015-06-11 16:44:52 -04:00
|
|
|
<?php
|
2015-06-16 11:11:35 -04:00
|
|
|
/**
|
|
|
|
* Base DB model
|
|
|
|
*/
|
2015-09-14 10:54:50 -04:00
|
|
|
namespace AnimeClient\Base;
|
2015-06-11 16:44:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base model for database interaction
|
|
|
|
*/
|
2015-09-14 10:54:50 -04:00
|
|
|
class DBModel extends Model {
|
2015-06-11 16:44:52 -04:00
|
|
|
/**
|
|
|
|
* The query builder object
|
|
|
|
* @var object $db
|
|
|
|
*/
|
|
|
|
protected $db;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The database connection information array
|
|
|
|
* @var array $db_config
|
|
|
|
*/
|
|
|
|
protected $db_config;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
2015-06-30 13:03:20 -04:00
|
|
|
public function __construct(Config $config)
|
2015-06-11 16:44:52 -04:00
|
|
|
{
|
2015-06-30 13:03:20 -04:00
|
|
|
parent::__construct($config);
|
2015-06-11 16:44:52 -04:00
|
|
|
$this->db_config = $this->config->database;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// End of BaseDBModel.php
|