addConnection([ 'driver' => 'mysql', 'host' => self::$host, 'database' => self::$dbName, 'username' => self::$user, 'password' => self::$password, 'charset' => self::$encoding, 'collation' => self::$collation, ]); $capsule->setEventDispatcher(new Dispatcher(new Container)); $capsule->setAsGlobal(); $capsule->bootEloquent(); self::$uIlluminate = $capsule; return $capsule; } /** * DB 객체 생성 * * @return \MeekroDB * @suppress PhanTypeMismatchProperty */ public static function db() { if (self::$uDB === null) { self::$uDB = new \MeekroDB(self::$host, self::$user, self::$password, self::$dbName, self::$port, self::$encoding); self::$uDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; self::$uDB->error_handler = function () { }; self::$uDB->throw_exception_on_error = true; self::$uDB->throw_exception_on_nonsql_error = true; } return self::$uDB; } public static function prefix() { return self::$prefix; } }