本文整理汇总了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;
}
示例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;
}