2015-06-11 16:44:52 -04:00
|
|
|
<?php
|
2015-06-16 11:11:35 -04:00
|
|
|
/**
|
|
|
|
* Base DB model
|
|
|
|
*/
|
2015-09-15 13:19:29 -04:00
|
|
|
namespace Aviat\AnimeClient\Model;
|
2015-09-14 10:54:50 -04:00
|
|
|
|
2015-09-17 23:11:18 -04:00
|
|
|
use Aviat\Ion\Di\ContainerInterface;
|
|
|
|
use Aviat\AnimeClient\Model as BaseModel;
|
2015-06-11 16:44:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base model for database interaction
|
|
|
|
*/
|
2015-09-17 23:11:18 -04:00
|
|
|
class DB extends BaseModel {
|
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-09-16 12:25:35 -04:00
|
|
|
*
|
2015-10-06 10:24:48 -04:00
|
|
|
* @param ContainerInterface $container
|
2015-06-11 16:44:52 -04:00
|
|
|
*/
|
2015-09-17 23:11:18 -04:00
|
|
|
public function __construct(ContainerInterface $container)
|
2015-06-11 16:44:52 -04:00
|
|
|
{
|
2015-09-14 10:54:50 -04:00
|
|
|
parent::__construct($container);
|
2015-06-11 16:44:52 -04:00
|
|
|
$this->db_config = $this->config->database;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// End of BaseDBModel.php
|