/** * create mapper instance */ public function initMapper() { switch ($this->dbsType) { case 'jig': $this->mapper = new Jig\Mapper($this->db, $this->table); break; case 'sql': $this->mapper = new SQL\Mapper($this->db, $this->table, $this->whitelist, $this->fluid ? 0 : $this->ttl); break; case 'mongo': $this->mapper = new Mongo\Mapper($this->db, $this->table); break; default: trigger_error(sprintf(self::E_UNKNOWN_DB_ENGINE, $this->dbsType)); } $this->queryParser = CortexQueryParser::instance(); $this->reset(); $this->clearFilter(); $f3 = \Base::instance(); $this->smartLoading = $f3->exists('CORTEX.smartLoading') ? $f3->get('CORTEX.smartLoading') : TRUE; $this->standardiseID = $f3->exists('CORTEX.standardiseID') ? $f3->get('CORTEX.standardiseID') : TRUE; if (!empty($this->fieldConf)) { foreach ($this->fieldConf as &$conf) { $conf = static::resolveRelationConf($conf); unset($conf); } } }