Exemplo n.º 1
0
 public function __construct($params)
 {
     parent::__construct();
     $this->db = EpiDatabase::getInstance('mysql', $params['database'], $params['host'], $params['username'], $params['password']);
     $this->table = $params['table'];
     if (isset($params['cacheMask']) && $params['cacheMask']) {
         $this->cacheMask = $params['cacheMask'];
         $this->cacheObj = getCache();
     }
 }
Exemplo n.º 2
0
function getDatabase()
{
    $employ = extract(EpiDatabase::employ());
    if (empty($type) || empty($name) || empty($host) || empty($user)) {
        EpiException::raise(new EpiCacheTypeDoesNotExistException('Could not determine which database module to load', 404));
    } else {
        return EpiDatabase::getInstance($type, $name, $host, $user, $pass);
    }
}
Exemplo n.º 3
0
 public function __construct($params)
 {
     parent::__construct();
     $this->db = EpiDatabase::getInstance('mysql', $params['database'], $params['host'], $params['username'], $params['password']);
     $this->table = $params['table'];
 }