当前位置: 首页>>代码示例>>PHP>>正文


PHP Connect::setUser方法代码示例

本文整理汇总了PHP中Connect::setUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::setUser方法的具体用法?PHP Connect::setUser怎么用?PHP Connect::setUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Connect的用法示例。


在下文中一共展示了Connect::setUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     /*
      * configuracoes
      */
     global $appName;
     if (isset($appName)) {
         $initPath = '../system-' . $appName . "/";
     } else {
         $initPath = "../system/";
     }
     require_once $initPath . 'vendor/cristal/config/CristalSettings.php';
     require_once $initPath . 'config/Settings.php';
     /*
      * setar configuracoes de data
      */
     date_default_timezone_set(Settings::$timeZone);
     /*
      * modo debug
      */
     if (Settings::$debugMode) {
         ini_set('display_errors', true);
         if (Settings::$showWarning) {
             error_reporting(E_ALL);
         } else {
             error_reporting(E_ERROR);
         }
         // error_reporting( E_ALL );
         // error_reporting( E_ALL ^ E_NOTICE ^ E_WARNING );
     } else {
         /*
          * oculta qualquer mensagem de erro
          */
         ini_set('display_errors', false);
         error_reporting(0);
     }
     /*
      * conexao com o banco
      */
     require_once Settings::$systemFolder . 'vendor/cristal/config/CristalConnect.php';
     require_once Settings::$systemFolder . 'config/Connect.php';
     Connect::setHost(Settings::$dbHost);
     Connect::setUser(Settings::$dbUser);
     Connect::setPass(Settings::$dbPass);
     Connect::setDatabase(Settings::$dbName);
     /*
      * estrutura base de objetos
      */
     require_once Settings::$systemFolder . 'vendor/cristal/CristalLib.php';
     require_once Settings::$systemFolder . 'Lib.php';
     require_once Settings::$systemFolder . 'vendor/cristal/model/Main.php';
     require_once Settings::$systemFolder . 'vendor/cristal/model/MainDao.php';
     require_once Settings::$systemFolder . 'vendor/cristal/controller/MainController.php';
     // require_once Settings::$systemFolder . 'controller/AuthController.php';
     @(require_once Settings::$systemFolder . 'controller/BaseController.php');
     @(require_once Settings::$systemFolder . 'model/BaseModel.php');
     @(require_once Settings::$systemFolder . 'model/BaseDao.php');
     /*
      * modo instalacao da aplicacao
      */
     if (Settings::$installMode == true) {
         require_once Settings::$systemFolder . 'vendor/cristal/install/CristalInstallController.php';
         require_once Settings::$systemFolder . 'install/InstallController.php';
         $install = new InstallController();
         die;
     }
     /*
      * trata a rota
      */
     require_once Settings::$systemFolder . 'vendor/cristal/controller/CristalRouteController.php';
     require_once Settings::$systemFolder . 'controller/RouteController.php';
     require_once Settings::$systemFolder . 'vendor/cristal/model/CristalRoute.php';
     $Route = new RouteController();
     $model = $Route->model;
     $action = $Route->action;
     /*
      * Objetos do framework
      */
     self::loadCristalClasses();
     /*
      * Objetos do usuario
      */
     require_once Settings::$systemFolder . 'controller/' . $model . 'Controller.php';
     @(include_once Settings::$systemFolder . 'model/' . $model . '.php');
     @(include_once Settings::$systemFolder . 'model/' . $model . 'Dao.php');
     /*
      * Inicia aplicacao
      */
     $controller = $model . 'Controller';
     $controller = new $controller();
     $controller->run($model, $action);
 }
开发者ID:dnielrodrigues,项目名称:cristal,代码行数:92,代码来源:FrontController.php

示例2: setUser

 public static function setUser()
 {
     global $params;
     Connect::setUser($params);
 }
开发者ID:saken21,项目名称:sudachi2,代码行数:5,代码来源:db.php


注:本文中的Connect::setUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。