本文整理汇总了PHP中Application::loadConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::loadConfig方法的具体用法?PHP Application::loadConfig怎么用?PHP Application::loadConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application
的用法示例。
在下文中一共展示了Application::loadConfig方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Logger class constructor, create the system.log file in the
* directory set in the config file.
*/
public function __construct()
{
$this->_folder = Application::loadConfig('log_path');
if (!is_readable($this->_folder . DS . $this->_file)) {
file_put_contents($this->_folder . DS . $this->_file, '');
}
}
示例2: nexus
/**
* Allow to the app to join data with the views
* @param type $traverse
*/
public function nexus($traverse)
{
$instance =& Controller::getInstance();
foreach (get_object_vars($instance) as $_sl_key => $_sl_var) {
if (!isset($this->buffer)) {
$this->{$_sl_key} =& $instance->{$_sl_key};
}
}
ob_start();
if (isset($traverse['vars'])) {
foreach ($traverse['vars'] as $key => $value) {
${$key} = $value;
}
}
if (!@(include VIEWS_PATH . $traverse['views'] . ".php")) {
echo "Error loading " . $traverse['views'] . " view";
}
$instance->buffer .= ob_get_clean();
if (Application::loadConfig('compress') == 1) {
$search = array('/\\>[^\\S ]+/s', '/[^\\S ]+\\</s', '/(\\s)+/s');
$replace = array('>', '<', '\\1');
$instance->buffer = preg_replace($search, $replace, $instance->buffer);
}
}
示例3: configure
/**
* Configure if the offline state
*/
public function configure()
{
if (Application::loadConfig('offline') == 1) {
$this->_path = $this->_routes['GET']['default_offline'];
}
}
示例4: __construct
/**
* Set the default language
*/
public function __construct()
{
$this->default = Application::loadConfig('language');
}
示例5: define
<?php
/**
* Bootstrap File for including necessary config files and autoloader.
* Also will be used as phpunit bootsrap
*
* @author Mikhail Lantukh <lantukhmikhail@gmail.com>
*/
define('APP_PATH', __DIR__);
include_once __DIR__ . '/../src/Loader.php';
\Kernel\Router\Router::getInstance()->load(include 'routes.php');
Application::loadConfig(include 'config.php');
示例6: __construct
/**
* Constructor class
*/
public function __construct()
{
$this->enable = Application::loadConfig('cache');
$this->_folder = Application::loadConfig('cache_path');
$this->_cachetime = Application::loadConfig('cache_time');
}