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(); } }
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); } }
public function __construct($params) { parent::__construct(); $this->db = EpiDatabase::getInstance('mysql', $params['database'], $params['host'], $params['username'], $params['password']); $this->table = $params['table']; }