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


PHP QApplication::InitializeDatabaseConnections方法代码示例

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


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

示例1: Initialize

 /**
  * This should be the first call to initialize all the static variables
  * The application object also has static methods that are miscellaneous web
  * development utilities, etc.
  * 
  * It also will make a call to InitializeDatabaseConnections()
  *
  * @return void
  */
 public static function Initialize()
 {
     // Basic Initailization Routines
     QApplication::InitializeEnvironment();
     QApplication::InitializeScriptInfo();
     QApplication::InitializeErrorHandling();
     // Perform Initialization for CLI
     if (QApplication::$CliMode) {
         QApplication::InitializeForCli();
         // *OR* Perform Initializations for WebApp
     } else {
         QApplication::InitializeOutputBuffering();
         QApplication::InitializeServerAddress();
         QApplication::InitializeRequestUri();
         QApplication::InitializeBrowserType();
         QApplication::InitializeServerSignature();
         QApplication::InitializePhpSession();
     }
     // Next, Initialize PHP AutoLoad Functionality
     QApplication::InitializeAutoload();
     // Next, Initialize the Database Connections
     QApplication::InitializeDatabaseConnections();
     // Then Preload all required "Prepload" Class Files
     foreach (QApplication::$PreloadedClassFile as $strClassFile) {
         require $strClassFile;
     }
     // Finally, go through any other auto_includes that this application requires
     QApplication::InitializeAutoIncludes();
 }
开发者ID:alcf,项目名称:chms,代码行数:38,代码来源:QApplicationBase.class.php

示例2: Initialize

 /**
  * This should be the first call to initialize all the static variables
  * The application object also has static methods that are miscellaneous web
  * development utilities, etc.
  * 
  * It also will make a call to InitializeDatabaseConnections()
  *
  * @return void
  */
 public static function Initialize()
 {
     // Basic Initailization Routines
     QApplication::InitializeEnvironment();
     QApplication::InitializeScriptInfo();
     // Next, Initialize PHP AutoLoad Functionality
     spl_autoload_extensions('.php,.inc,.class.php');
     spl_autoload_register(array('QApplication', 'Autoload'));
     // Perform Initialization for CLI
     if (QApplication::$CliMode) {
         QCli::InitializeForCli();
     } else {
         QApplication::InitializeErrorHandling();
         QApplication::InitializeOutputBuffering();
         QApplication::InitializeServerAddress();
         QApplication::InitializeRequestUri();
         QApplication::InitializeServerSignature();
         QApplication::InitializePhpSession();
     }
     // Next, Initialize the Database Connections
     QApplication::InitializeDatabaseConnections();
     // Finally, go through any other auto_includes that this application requires
     QApplication::InitializeAutoIncludes();
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:33,代码来源:QApplicationBase.class.php

示例3: set_error_handler

  * Set Error/Exception Handling to the default
  * Qcodo HandleError and HandlException functions
  * (Only in non CLI mode)
  *
  * Feel free to change, if needed, to your own
  * custom error handling script(s).
  */
 if (array_key_exists('SERVER_PROTOCOL', $_SERVER)) {
     set_error_handler('QcodoHandleError', E_ALL);
     set_exception_handler('QcodoHandleException');
 }
 ////////////////////////////////////////////////
 // Initialize the Application and DB Connections
 ////////////////////////////////////////////////
 QApplication::Initialize();
 QApplication::InitializeDatabaseConnections();
 QApplication::LoadTracmorSettings();
 /////////////////////////////
 // Start Session Handler (if required)
 /////////////////////////////
 //session_set_cookie_params(2);
 session_start();
 //////////////////////////////////////////////
 // Setup Internationalization and Localization (if applicable)
 // Note, this is where you would implement code to do Language Setting discovery, as well, for example:
 // * Checking against $_GET['language_code']
 // * checking against session (example provided below)
 // * Checking the URL
 // * etc.
 // TODO: options to do this are left to the developer
 //////////////////////////////////////////////
开发者ID:heshuai64,项目名称:einv2,代码行数:31,代码来源:prepend.inc.php

示例4: Initialize

 /**
  * This should be the first call to initialize all the static variables
  * The application object also has static methods that are miscellaneous web
  * development utilities, etc.
  * 
  * It also will make a call to InitializeDatabaseConnections()
  *
  * @return void
  */
 public static function Initialize()
 {
     // Basic Initailization Routines
     QApplication::InitializeCliMode();
     QApplication::InitializeErrorHandling();
     QApplication::InitializeServerAddress();
     QApplication::InitializeScriptInfo();
     QApplication::InitializeRequestUri();
     QApplication::InitializeBrowserType();
     // Preload all required "Prepload" Class Files
     foreach (QApplication::$PreloadedClassFile as $strClassFile) {
         require $strClassFile;
     }
     // Perform initialize routine for CLI calls (if applicable)
     if (QApplication::$CliMode) {
         QApplication::InitializeForCli();
     }
     // Finally, Initialize the Database Connections
     QApplication::InitializeDatabaseConnections();
 }
开发者ID:kmcelhinney,项目名称:qcodo,代码行数:29,代码来源:QApplicationBase.class.php


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