本文整理汇总了PHP中Kurogo::siteConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Kurogo::siteConfig方法的具体用法?PHP Kurogo::siteConfig怎么用?PHP Kurogo::siteConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kurogo
的用法示例。
在下文中一共展示了Kurogo::siteConfig方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = null)
{
if (!is_array($config) || empty($config)) {
if (!$config instanceof Config) {
$config = Kurogo::siteConfig();
}
$config = array('DB_TYPE' => $config->getVar('DB_TYPE', 'database'), 'DB_HOST' => $config->getVar('DB_HOST', 'database'), 'DB_USER' => $config->getVar('DB_USER', 'database'), 'DB_PASS' => $config->getVar('DB_PASS', 'database'), 'DB_DBNAME' => $config->getVar('DB_DBNAME', 'database'), 'DB_FILE' => $config->getVar('DB_FILE', 'database'), 'DB_CREATE' => $config->getOptionalVar('DB_CREATE', 'database'), 'DB_PORT' => $config->getOptionalVar('DB_PORT', 'database'));
}
$this->init($config);
}
示例2: __construct
public function __construct($config=null)
{
if (!is_array($config) || empty($config)) {
if (!$config instanceOf Config) {
$config = Kurogo::siteConfig();
}
$config = array(
'DB_TYPE'=>$config->getVar('DB_TYPE'),
'DB_HOST'=>$config->getVar('DB_HOST'),
'DB_USER'=>$config->getVar('DB_USER'),
'DB_PASS'=>$config->getVar('DB_PASS'),
'DB_DBNAME'=>$config->getVar('DB_DBNAME'),
'DB_FILE'=>$config->getVar('DB_FILE')
);
}
$this->init($config);
}
示例3: getOptionalSiteSection
public static function getOptionalSiteSection($section)
{
return Kurogo::siteConfig()->getOptionalSection($section);
}
示例4: loadSiteConfigFile
protected function loadSiteConfigFile($name, $opts = 0)
{
$config = ConfigFile::factory($name, 'site', $opts);
Kurogo::siteConfig()->addConfig($config);
return $config->getSectionVars(true);
}
示例5: getConfig
/**
* Returns a config file
* @param string $type the config file type (module, feeds, pages, etc)
* @param int $opts bitfield of ConfigFile options
* @return ConfigFile object
*/
protected function getConfig($type, $opts = 0)
{
if (isset($this->configs[$type])) {
return $this->configs[$type];
}
if ($config = ModuleConfigFile::factory($this->configModule, $type, $opts, $this)) {
Kurogo::siteConfig()->addConfig($config);
$this->setConfig($type, $config);
}
return $config;
}
示例6: loadSiteConfigFile
protected function loadSiteConfigFile($name, $keyName = null, $opts = 0)
{
$config = ConfigFile::factory($name, 'site', $opts);
Kurogo::siteConfig()->addConfig($config);
if ($keyName === null) {
$keyName = $name;
}
return $this->loadConfigFile($config, $keyName);
}
示例7: getConfig
/**
* Returns a config file
* @param string $id the module id
* @param string $type the config file type (module, feeds, pages, etc)
* @param int $opts bitfield of ConfigFile options
* @return ConfigFile object
*/
protected function getConfig($type, $opts=0) {
if ($config = ModuleConfigFile::factory($this->configModule, $type, $opts)) {
Kurogo::siteConfig()->addConfig($config);
}
return $config;
}
示例8: htmlColorForColorString
$result['title'] = $feature->getTitle();
}
return $result;
}
function htmlColorForColorString($colorString)
{
return substr($colorString, strlen($colorString) - 6);
}
function isValidURL($urlString)
{
// There is a bug in some versions of filter_var where it can't handle hyphens in hostnames
return filter_var(strtr($urlString, '-', '.'), FILTER_VALIDATE_URL);
}
class MapsAdmin
{
public static function getMapControllerClasses()
{
return array('MapDataController' => 'default', 'MapDBDataController' => 'database');
}
public static function getStaticMapClasses()
{
return array('GoogleStaticMap' => 'Google', 'ArcGISStaticMap' => 'ArcGIS', 'WMSStaticMap' => 'WMS');
}
public static function getDynamicControllerClasses()
{
return array('GoogleJSMap' => 'Google', 'ArcGISJSMap' => 'ArcGIS');
}
}
$config = ConfigFile::factory('maps', 'site');
Kurogo::siteConfig()->addConfig($config);