public function __construct(BaseController $controller) { // 配置文件中检测安装设置 $this->controller = $controller; $this->installed = $controller->getAppConfig()->get('appinit', false); $this->dbType = $controller->getDbType(); }
public function __construct(BaseController $controller) { $this->dbType = $controller->getDbType(); $this->tablePre = $controller->getTablePre(); $this->userImg = $controller->getAppConfig()->get('app_pub_context') . '/img/user_default.png'; if ($this->dbType == BaseController::DB_MYSQL) { $this->conn = $controller->getConn(); } elseif ($this->dbType == BaseController::DB_REDIS) { $this->redis = $controller->getRedis(); } }
public function __construct(BaseController $controller) { $this->dbType = $controller->getDbType(); $this->tablePre = $controller->getTablePre(); $this->dictPath = $controller->getAppConfig()->get('mvc_static_path') . DIRECTORY_SEPARATOR . 'scws' . DIRECTORY_SEPARATOR . 'dict.utf8.xdb'; if ($this->dbType == BaseController::DB_MYSQL) { $this->conn = $controller->getConn(); } elseif ($this->dbType == BaseController::DB_REDIS) { $this->redis = $controller->getRedis(); } }