當前位置: 首頁>>代碼示例>>PHP>>正文


PHP InnomaticContainer::getHome方法代碼示例

本文整理匯總了PHP中Innomatic\Core\InnomaticContainer::getHome方法的典型用法代碼示例。如果您正苦於以下問題:PHP InnomaticContainer::getHome方法的具體用法?PHP InnomaticContainer::getHome怎麽用?PHP InnomaticContainer::getHome使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Innomatic\Core\InnomaticContainer的用法示例。


在下文中一共展示了InnomaticContainer::getHome方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLoggedSessions

 public function getLoggedSessions()
 {
     $result['root'] = $result['domains'] = array();
     $dir = $this->container->getHome() . 'core/temp/phpsessions/';
     if (is_dir($dir)) {
         $dh = opendir($dir);
         if ($dh) {
             while (($file = readdir($dh)) !== false) {
                 if ($file != '.' and $file != '..') {
                     if (filesize($dir . $file)) {
                         $content = file($dir . $file);
                         $extracted = $this->sessStringToArray($content[0]);
                         if (isset($extracted['INNOMATIC_ROOT_AUTH_USER'])) {
                             $result['root'][] = $file;
                         }
                         if (isset($extracted['INNOMATIC_AUTH_USER'])) {
                             $result['domains'][$extracted['INNOMATIC_AUTH_USER']][] = $file;
                         }
                     }
                 }
             }
             closedir($dh);
         }
     }
     return $result;
 }
開發者ID:kchizi,項目名稱:innomatic-legacy,代碼行數:26,代碼來源:SecurityManager.php

示例2: loadWidget

 /**
  * Loads the handler for a widget class.
  * @param widgetName string - widget class name to load.
  * @return True if the widget has been loaded. May return false if the widget handler file doesn't exists.
  * @deprecated
  */
 public function loadWidget($widgetName)
 {
     if (class_exists('\\Shared\\Wui\\Wui' . ucfirst($widgetName), true)) {
         $this->mLoadedWidgets[$widgetName] = $widgetName;
         return true;
     }
     if (class_exists('Wui' . ucfirst($widgetName), false)) {
         $this->mLoadedWidgets[$widgetName] = $widgetName;
         return true;
     }
     // @todo remove compatibility mode
     $widgetFile = $this->container->getHome() . 'core/classes/shared/wui/Wui' . ucfirst($widgetName) . '.php';
     $result = (include_once $widgetFile);
     if (!$result) {
         $log = $this->container->getLogger();
         $log->logEvent('innomatic.wui.wui.loadwidget', 'Unable to load widget handler file ' . $this->container->getHome() . 'core/classes/shared/wui/Wui' . ucfirst($widgetName) . '.php', \Innomatic\Logging\Logger::ERROR);
         throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::MISSING_WIDGET_FILE);
     }
     $this->mLoadedWidgets[$widgetName] = $widgetName;
     return true;
 }
開發者ID:innomatic,項目名稱:innomatic-legacy,代碼行數:27,代碼來源:Wui.php


注:本文中的Innomatic\Core\InnomaticContainer::getHome方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。