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


PHP Kurogo::siteConfig方法代码示例

本文整理汇总了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);
 }
开发者ID:nncsang,项目名称:Kurogo,代码行数:10,代码来源:db.php

示例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);
  }
开发者ID:nyetrogen,项目名称:UIndy-Mobile,代码行数:19,代码来源:db.php

示例3: getOptionalSiteSection

 public static function getOptionalSiteSection($section)
 {
     return Kurogo::siteConfig()->getOptionalSection($section);
 }
开发者ID:hxfnd,项目名称:Kurogo-Mobile-Web,代码行数:4,代码来源:Kurogo.php

示例4: loadSiteConfigFile

 protected function loadSiteConfigFile($name, $opts = 0)
 {
     $config = ConfigFile::factory($name, 'site', $opts);
     Kurogo::siteConfig()->addConfig($config);
     return $config->getSectionVars(true);
 }
开发者ID:hxfnd,项目名称:Kurogo-Mobile-Web,代码行数:6,代码来源:APIModule.php

示例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;
 }
开发者ID:nncsang,项目名称:Kurogo,代码行数:17,代码来源:Module.php

示例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);
 }
开发者ID:rolandinsh,项目名称:Kurogo-Mobile-Web,代码行数:9,代码来源:WebModule.php

示例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;
 }
开发者ID:neoroman,项目名称:Kurogo-Mobile-Web,代码行数:13,代码来源:Module.php

示例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);
开发者ID:hxfnd,项目名称:Kurogo-Mobile-Web,代码行数:30,代码来源:Maps.php


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