本文整理汇总了PHP中Setting::getDB方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getDB方法的具体用法?PHP Setting::getDB怎么用?PHP Setting::getDB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::getDB方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
## Setting initialization
Setting::initPath();
$basePath = Setting::getBasePath();
$modules = Setting::getModules();
## define config
$config = array('basePath' => $basePath, 'name' => !Setting::get('app.name') ? "Plansys" : Setting::get('app.name'), 'preload' => array('log', 'EJSUrlManager'), 'import' => array('app.models.*', 'application.models.*', 'application.forms.*', 'app.forms.*', 'app.components.utility.*', 'application.components.*', 'application.components.ui.*', 'application.components.ui.FormFields.*', 'application.components.ui.Widgets.*', 'application.components.utility.*', 'application.components.models.*', 'application.components.codegen.*', 'application.components.repo.*', 'application.behaviors.*', 'ext.YiiJasper.*'), 'runtimePath' => Setting::getRuntimePath(), 'sourceLanguage' => 'en_us', 'language' => 'id', 'modulePath' => Setting::getModulePath(), 'controllerMap' => Setting::getControllerMap(), 'modules' => array_merge($modules, array('nfy' => array('class' => 'nfy.NfyModule'))), 'aliases' => array('nfy' => Setting::getBasePath() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'nfy'), 'components' => array('assetManager' => array('basePath' => Setting::getAssetPath()), 'img' => array('class' => 'application.extensions.simpleimage.CSimpleImage'), 'ldap' => Setting::getLDAP(), 'nfy' => array('class' => 'nfy.components.NfyDbQueue', 'id' => 'Notifications', 'timeout' => 30), 'todo' => array('class' => 'application.components.ui.Widgets.TodoWidget'), 'EJSUrlManager' => array('class' => 'ext.JSUrlManager.EJSUrlManager'), 'user' => array('allowAutoLogin' => true, 'class' => 'WebUser'), 'db' => Setting::getDB(), 'errorHandler' => array('class' => 'ErrorHandler'), 'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CFileLogRoute', 'levels' => 'error, warning'))), 'widgetFactory' => array(), 'cache' => array('class' => 'system.caching.CFileCache'), 'clientScript' => array('packages' => array('jquery' => array('basePath' => "application.static.js.lib", 'js' => array('jquery.js'), 'coreScriptPosition' => CClientScript::POS_HEAD))), 'ePdf' => array('class' => 'ext.yiipdf.EYiiPdf', 'params' => array('HTML2PDF' => array('librarySourcePath' => 'application.extensions.html2pdf.*', 'classFile' => 'html2pdf.class.php')))), 'params' => array());
$config = Setting::finalizeConfig($config);
return $config;
示例2: dirname
<?php
require_once dirname(__FILE__) . '/../components/utility/Helper.php';
require_once dirname(__FILE__) . '/../components/utility/Setting.php';
## Setting initialization
Setting::init(__FILE__);
Setting::initPath();
$basePath = Setting::getBasePath();
$modules = Setting::getModules();
## components
$components = array('assetManager' => array('basePath' => Setting::getAssetPath()), 'db' => Setting::getDB(), 'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CFileLogRoute', 'levels' => 'error, warning'))));
$dbLists = Setting::getDBList();
$components = $dbLists + $components;
$imports = array('app.models.*', 'application.models.*', 'application.forms.*', 'application.components.*', 'application.components.ui.*', 'application.components.ui.FormFields.*', 'application.components.ui.Widgets.*', 'application.components.utility.*', 'application.components.models.*', 'application.components.codegen.*', 'application.components.repo.*', 'application.behaviors.*');
foreach ($dbLists as $db => $val) {
array_splice($imports, 1, 0, "app.models.{$db}.*");
}
## define config
$config = array('basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', 'name' => 'Plansys Console', 'preload' => array('log', 'EJSUrlManager'), 'import' => $imports, 'runtimePath' => Setting::getRuntimePath(), 'sourceLanguage' => 'en_us', 'language' => 'id', 'modulePath' => Setting::getModulePath(), 'commandMap' => Setting::getCommandMap($modules), 'modules' => $modules, 'components' => $components, 'params' => array());
$config = Setting::finalizeConfig($config);
return $config;
示例3: dirname
<?php
require_once dirname(__FILE__) . '/../components/utility/Helper.php';
require_once dirname(__FILE__) . '/../components/utility/Setting.php';
## Setting initialization
Setting::init(__FILE__);
Setting::initPath();
$basePath = Setting::getBasePath();
$modules = Setting::getModules();
## define config
$config = array('basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', 'name' => 'Plansys Console', 'preload' => array('log', 'EJSUrlManager'), 'import' => array('app.models.*', 'application.models.*', 'application.forms.*', 'application.components.*', 'application.components.ui.*', 'application.components.ui.FormFields.*', 'application.components.ui.Widgets.*', 'application.components.utility.*', 'application.components.models.*', 'application.components.codegen.*', 'application.components.repo.*', 'application.behaviors.*'), 'runtimePath' => Setting::getRuntimePath(), 'preload' => array('log'), 'modules' => array_merge($modules, array('nfy')), 'aliases' => array('nfy' => realpath(__DIR__ . '/../modules/nfy')), 'commandMap' => Setting::getCommandMap($modules), 'components' => array('assetManager' => array('basePath' => Setting::getAssetPath()), 'db' => Setting::getDB(), 'nfy' => array('class' => 'nfy.components.NfyDbQueue', 'id' => 'Notifications', 'timeout' => 30), 'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CFileLogRoute', 'levels' => 'error, warning')))));
$config = Setting::finalizeConfig($config, "console");
return $config;
示例4: array
<?php
## Setting initialization
Setting::initPath();
$basePath = Setting::getBasePath();
$modules = Setting::getModules();
## components
$components = array('assetManager' => array('basePath' => Setting::getAssetPath()), 'img' => array('class' => 'application.extensions.simpleimage.CSimpleImage'), 'ldap' => Setting::getLDAP(), 'nfy' => array('class' => 'nfy.components.NfyDbQueue', 'id' => 'Notifications', 'timeout' => 30), 'todo' => array('class' => 'application.components.ui.Widgets.TodoWidget'), 'EJSUrlManager' => array('class' => 'ext.JSUrlManager.EJSUrlManager'), 'user' => array('allowAutoLogin' => true, 'class' => 'WebUser'), 'db' => Setting::getDB(), 'errorHandler' => array('class' => 'ErrorHandler'), 'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CFileLogRoute', 'levels' => 'error, warning'))), 'widgetFactory' => array(), 'cache' => array('class' => 'system.caching.CFileCache'), 'clientScript' => array('packages' => array('jquery' => array('basePath' => "application.static.js.lib", 'js' => array('jquery.js'), 'coreScriptPosition' => CClientScript::POS_HEAD))));
$dbLists = Setting::getDBList();
$components = $dbLists + $components;
$imports = array('app.models.*', 'application.models.*', 'application.forms.*', 'app.forms.*', 'app.components.utility.*', 'application.components.*', 'application.components.ui.*', 'application.components.ui.FormFields.*', 'application.components.ui.Widgets.*', 'application.components.utility.*', 'application.components.models.*', 'application.components.codegen.*', 'application.components.repo.*', 'application.behaviors.*');
foreach ($dbLists as $db => $val) {
array_splice($imports, 1, 0, "app.models.{$db}.*");
}
## define config
$config = array('basePath' => $basePath, 'viewPath' => Setting::getViewPath(), 'name' => !Setting::get('app.name') ? "Plansys" : Setting::get('app.name'), 'preload' => array('log', 'EJSUrlManager'), 'import' => $imports, 'runtimePath' => Setting::getRuntimePath(), 'sourceLanguage' => 'en_us', 'language' => 'id', 'modulePath' => Setting::getModulePath(), 'controllerMap' => Setting::getControllerMap(), 'modules' => $modules, 'components' => $components, 'params' => array());
$config = Setting::finalizeConfig($config);
return $config;
示例5: getDBListAll
public static function getDBListAll()
{
return ['db' => Setting::getDB(), '---' => '---'] + Setting::getDBList();
}