/** * Instatiate a new TeraWurfl object */ public function __construct() { $this->errors = array(); $this->capabilities = array(); $this->matcherHistory = array(); $this->rootdir = dirname(__FILE__) . '/'; $dbconnector = 'TeraWurflDatabase_' . TeraWurflConfig::$DB_CONNECTOR; if ($this->db === false) { $this->db = new $dbconnector(); } if (!$this->db->connect()) { throw new TeraWurflDatabaseException("Cannot connect to database: " . $this->db->getLastError()); } }