2015-06-11 16:44:52 -04:00
|
|
|
<?php
|
2015-06-16 11:11:35 -04:00
|
|
|
/**
|
|
|
|
* Base DB model
|
|
|
|
*/
|
2015-06-26 16:39:10 -04:00
|
|
|
namespace AnimeClient;
|
2015-06-11 16:44:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base model for database interaction
|
|
|
|
*/
|
|
|
|
class BaseDBModel extends BaseModel {
|
|
|
|
/**
|
|
|
|
* 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
|