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


PHP Kurogo::getSiteSection方法代码示例

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


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

示例1: __construct

 public function __construct($config = null)
 {
     if (!is_array($config) || empty($config)) {
         $config = Kurogo::getSiteSection('database');
     }
     $this->init($config);
 }
开发者ID:sponto,项目名称:msbm-mobile,代码行数:7,代码来源:db.php

示例2: __construct

 public function __construct($config = null)
 {
     if (!is_array($config) || empty($config)) {
         $config = Kurogo::getSiteSection('database');
         $config = array_merge($config, array_intersect_key($_SERVER, $config));
     }
     $this->init($config);
 }
开发者ID:sponto,项目名称:Kurogo-Mobile-Web,代码行数:8,代码来源:db.php

示例3: init

 protected function init($args)
 {
     parent::init($args);
     if (!isset($args['DB_TYPE'])) {
         $args = array_merge(Kurogo::getSiteSection('database'), $args);
     }
     if (isset($args['SQL'])) {
         $this->setSQL($args['SQL']);
     }
     if (isset($args['PARAMETERS']) && is_array($args['PARAMETERS'])) {
         $this->setParameters($args['PARAMETERS']);
     }
     $this->connection = new db($args);
 }
开发者ID:nncsang,项目名称:Kurogo,代码行数:14,代码来源:DatabaseDataRetriever.php

示例4: session

 public function session()
 {
     $this->addPackage('Session');
     if (!$this->session) {
         $args = Kurogo::getSiteSection('authentication');
         //default session class
         $controllerClass = 'SessionFiles';
         //maintain previous config compatibility
         if (isset($args['AUTHENTICATION_USE_SESSION_DB']) && $args['AUTHENTICATION_USE_SESSION_DB']) {
             $controllerClass = 'SessionDB';
         }
         if (isset($args['AUTHENTICATION_SESSION_CLASS'])) {
             $controllerClass = $args['AUTHENTICATION_SESSION_CLASS'];
         }
         $this->session = Session::factory($controllerClass, $args);
     }
     return $this->session;
 }
开发者ID:hxfnd,项目名称:Kurogo-Mobile-Web,代码行数:18,代码来源:Kurogo.php

示例5: Exception

        default:
            throw new Exception("Invalid API request: '{$_SERVER['REQUEST_URI']}'", 1);
            break;
    }    

    /* log the api call */
    PageViews::log_api($id, Kurogo::deviceClassifier()->getPlatform());
    $module->executeCommand();

    
} else {
    $id = $parts[0];
    $page = 'index';
    
    /* see if there's a redirect for this path */
    if ($url_redirects = Kurogo::getSiteSection('urls')) {
      if (array_key_exists($id, $url_redirects)) {
        if (preg_match("#^http(s)?://#", $url_redirects[$id])) {
           $url = $url_redirects[$id];
        } else {
          $parts[0] = $url_redirects[$id];
          $url = URL_PREFIX . implode("/", $parts);
        }
        header("Location: " . $url);
        exit;
      }
    }
    
    // find the page part
    if (isset($parts[1])) {
      if (strlen($parts[1])) {
开发者ID:neoroman,项目名称:Kurogo-Mobile-Web,代码行数:31,代码来源:index.php

示例6: init

    protected function init($args) {
        parent::init($args);
        
        $args = is_array($args) ? $args : array();
        if (!isset($args['DB_TYPE'])) {
            $args = array_merge(Kurogo::getSiteSection('database'), $args);
        }
        
        $this->connection = new db($args);                
        if (isset($args['SORTFIELDS']) && is_array($args['SORTFIELDS'])) {
            $this->sortFields = $args['SORTFIELDS'];
        }
                        
        $this->table = isset($args['DB_USER_TABLE']) ? $args['DB_USER_TABLE'] : 'users';

        $this->fieldMap = array(
            'userid'=>isset($args['DB_USERID_FIELD']) ? $args['DB_USERID_FIELD'] : 'userID',
            'email'=>isset($args['DB_EMAIL_FIELD']) ? $args['DB_EMAIL_FIELD'] : 'email',
            'firstname'=>isset($args['DB_FIRSTNAME_FIELD']) ? $args['DB_FIRSTNAME_FIELD'] : 'firstname',
            'lastname'=>isset($args['DB_LASTNAME_FIELD']) ? $args['DB_LASTNAME_FIELD'] : 'lastname'
        );
    }
开发者ID:neoroman,项目名称:Kurogo-Mobile-Web,代码行数:22,代码来源:DatabasePeopleController.php

示例7: init

 public function init($args)
 {
     parent::init($args);
     $args = is_array($args) ? $args : array();
     if (!isset($args['DB_TYPE'])) {
         $args = array_merge(Kurogo::getSiteSection('database'), $args);
     }
     $this->connection = new db($args);
     $this->tableMap = array('user' => 'users', 'group' => 'groups', 'groupmembers' => 'groupmembers');
     $this->fieldMap = array('user_userid' => 'userID', 'user_password' => 'password', 'user_email' => 'email', 'user_firstname' => 'firstname', 'user_lastname' => 'lastname', 'user_fullname' => 'fullname', 'group_groupname' => 'group', 'group_gid' => 'gid', 'group_groupmember' => 'gid', 'groupmember_group' => 'gid', 'groupmember_user' => 'userID', 'groupmember_authority' => '');
     foreach ($args as $arg => $value) {
         if (preg_match("/^db_(user|group|groupmember)_(.*?)_field\$/", strtolower($arg), $bits)) {
             $key = sprintf("%s_%s", $bits[1], $bits[2]);
             if (isset($this->fieldMap[$key])) {
                 $this->fieldMap[$key] = $value;
             }
         } elseif (preg_match("/^db_(.*?)_table\$/", strtolower($arg), $bits)) {
             $key = $bits[1];
             if (isset($this->tableMap[$key])) {
                 $this->tableMap[$key] = $value;
             }
         } else {
             switch ($arg) {
                 case 'DB_USER_PASSWORD_HASH':
                     if (preg_match("/^hmac_(.+)\$/", $value, $bits)) {
                         if (!isset($args['DB_USER_PASSWORD_KEY'])) {
                             throw new KurogoConfigurationException("HMAC hash requires DB_USER_PASSWORD_KEY");
                         }
                         $this->hmac = true;
                         $value = $bits[1];
                     }
                     if (!in_array($value, hash_algos())) {
                         throw new KurogoConfigurationException("Hashing algorithm {$value} not available");
                     }
                     $this->hashAlgo = $value;
                     break;
                 case 'DB_USER_PASSWORD_KEY':
                     $this->hashKey = $value;
                     break;
                 case 'DB_USER_PASSWORD_SALT':
                 case 'DB_USER_PASSWORD_SALT_BEFORE':
                     $this->hashSaltBefore = $value;
                     break;
                 case 'DB_USER_PASSWORD_SALT_AFTER':
                     $this->hashSaltAfter = $value;
                     break;
                 case 'DB_USER_PASSWORD_SALT_FIELD_BEFORE':
                     $this->hashSaltFieldBefore = $value;
                     break;
                 case 'DB_USER_PASSWORD_SALT_FIELD_AFTER':
                     $this->hashSaltFieldAfter = $value;
                     break;
                 case 'DB_GROUP_GROUPMEMBER_PROPERTY':
                     if (!in_array($value, array('group', 'gid'))) {
                         throw new KurogoConfigurationException("Invalid value for DB_GROUP_GROUPMEMBER_PROPERTY {$value}. Should be gid or group");
                     }
                     $this->fieldMap['group_groupmember'] = $value;
                     break;
             }
         }
     }
 }
开发者ID:nncsang,项目名称:Kurogo,代码行数:62,代码来源:DatabaseAuthentication.php

示例8: loadPageConfig

 private function loadPageConfig()
 {
     if (!isset($this->pageConfig)) {
         Kurogo::log(LOG_DEBUG, "Loading page configuration for {$this->configModule} - {$this->page}", 'module');
         $this->setPageTitle($this->moduleName);
         // Load site configuration and help text
         $this->assign('strings', Kurogo::getSiteSection('strings'));
         // load module config file
         $pageData = $this->getPageData();
         if (!isset($pageData[$this->page])) {
             throw new KurogoPageNotFoundException(Kurogo::getLocalizedString("ERROR_PAGE_NOT_FOUND", $this->page));
         }
         $pageConfig = $pageData[$this->page];
         if (KurogoWebBridge::isNativeCall()) {
             $this->hasWebBridgePageRefresh = self::argVal($pageConfig, 'nativePageRefresh', false);
             $this->hasWebBridgeAutoRefresh = self::argVal($pageConfig, 'nativePageAutoRefresh', false);
         }
         if (KurogoWebBridge::isNativeCall() && self::argVal($pageConfig, 'nativePageTitle', '')) {
             $this->pageTitle = $pageConfig['nativePageTitle'];
         } else {
             if (isset($pageConfig['pageTitle']) && strlen($pageConfig['pageTitle'])) {
                 $this->pageTitle = $pageConfig['pageTitle'];
             }
         }
         if (KurogoWebBridge::isNativeCall() && self::argVal($pageConfig, 'nativeBreadcrumbTitle', '')) {
             $this->breadcrumbTitle = $pageConfig['nativeBreadcrumbTitle'];
         } else {
             if (isset($pageConfig['breadcrumbTitle']) && strlen($pageConfig['breadcrumbTitle'])) {
                 $this->breadcrumbTitle = $pageConfig['breadcrumbTitle'];
             } else {
                 $this->breadcrumbTitle = $this->pageTitle;
             }
         }
         if (isset($pageConfig['breadcrumbLongTitle']) && strlen($pageConfig['breadcrumbLongTitle'])) {
             $this->breadcrumbLongTitle = $pageConfig['breadcrumbLongTitle'];
         } else {
             $this->breadcrumbLongTitle = $this->pageTitle;
         }
         $this->pageConfig = $pageConfig;
     }
     // Ajax overrides for breadcrumb title and long title
     if (isset($this->args[self::AJAX_BREADCRUMB_TITLE])) {
         $this->breadcrumbTitle = $this->args[self::AJAX_BREADCRUMB_TITLE];
         $this->breadcrumbLongTitle = $this->breadcrumbTitle;
     }
     if (isset($this->args[self::AJAX_BREADCRUMB_LONG_TITLE])) {
         $this->breadcrumbLongTitle = $this->args[self::AJAX_BREADCRUMB_LONG_TITLE];
     }
 }
开发者ID:sponto,项目名称:msbm-mobile,代码行数:49,代码来源:WebModule.php

示例9: getSession

 /**
   * Returns the current login session
   * @param string $type, the type of module to load (web/api)
   */
 protected function getSession() {
     if (!$this->session) {
         $args = Kurogo::getSiteSection('authentication');
         $args['DEBUG_MODE'] = Kurogo::getSiteVar('DATA_DEBUG');
         $this->session = new Session($args);
     }
 
     return $this->session;
 }
开发者ID:neoroman,项目名称:Kurogo-Mobile-Web,代码行数:13,代码来源:Module.php

示例10: timezoneFilter

 private static function timezoneFilter($tzid)
 {
     static $timezoneMap;
     if (!$timezoneMap) {
         $timezoneMap = Kurogo::getSiteSection('timezones');
     }
     return Kurogo::arrayVal($timezoneMap, $tzid, $tzid);
 }
开发者ID:sponto,项目名称:Kurogo-Mobile-Web,代码行数:8,代码来源:ICalendar.php


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