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


PHP InnomaticContainer::getState方法代码示例

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


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

示例1: array

 /**
  * Executes a global search in multiple types.
  *
  * @param mixed $searchKeys
  * @param string|array $type A type or array of types to be searched for.
  * @param bool $trashcan
  * @param int $limit
  * @param bool $restrictToPermission
  * @access public
  * @return void
  */
 public function &globalSearch($searchKeys, $type = '', $trashcan = false, $limit = 0, $restrictToPermission = InnoworkItem::SEARCH_RESTRICT_NONE)
 {
     $result = array();
     if ($this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_DEBUG) {
         $this->container->getLoadTimer()->mark('InnoworkCore: start global search');
     }
     $result['result'] = array();
     $result['founditems'] = 0;
     while (list($key, $value) = each($this->summary)) {
         if ($value['searchable'] and ($type == '' or $type != '' and (!is_array($type) and $type == $key or is_array($type) and in_array($key, $type)))) {
             $class_name = $this->summary[$key]['classname'];
             if (!class_exists($class_name)) {
                 continue;
             }
             $tmp_class = new $class_name($this->rootDA, $this->domainDA);
             if (!$trashcan or $trashcan and $tmp_class->mNoTrash == false) {
                 $result['result'][$key] = $tmp_class->search($searchKeys, '', false, $trashcan, (int) $limit, 0, $restrictToPermission);
                 $result['founditems'] += count($result['result'][$key]);
                 //$tmp_locale = new LocaleCatalog( $itemtype_query->getFields( 'catalog' ), $this->container->getCurrentUser()->getLanguage() );
             }
         }
     }
     reset($this->summary);
     if ($this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_DEBUG) {
         $this->container->getLoadTimer()->mark('InnoworkCore: end global search');
     }
     return $result;
 }
开发者ID:innomatic,项目名称:innowork-core,代码行数:39,代码来源:InnoworkKnowledgeBase.php

示例2: ___construct

 public function ___construct($forceSetup = false)
 {
     $this->container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     $this->mBuilt = false;
     // Parameters must be extracted before starting any dispatcher or validator
     //
     $this->parameters = $this->arrayMergeClobber($this->arrayMergeClobber($_GET, $_POST), $_FILES);
     $this->mDisp = new \Innomatic\Wui\Dispatch\WuiDispatcher('wui');
     $this->mForceSetup = $forceSetup;
     if ($this->container->getState() != \Innomatic\Core\InnomaticContainer::STATE_SETUP or $this->mForceSetup and $this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_SETUP) {
         $rootDA = $this->container->getDataAccess();
         if (is_object($rootDA)) {
             $this->mrRootDb = $rootDA;
         }
     }
     // AJAX
     $ajax_request_uri = $_SERVER['REQUEST_URI'];
     if (strpos($ajax_request_uri, '?')) {
         $ajax_request_uri = substr($ajax_request_uri, 0, strpos($ajax_request_uri, '?'));
     }
     $this->xajax = \Innomatic\Ajax\Xajax::instance('Xajax', $ajax_request_uri);
 }
开发者ID:innomatic,项目名称:innomatic-legacy,代码行数:22,代码来源:Wui.php

示例3: executeDomain

 /**
  * Launches a panel in the domain desktop.
  *
  * If the panel name is one "main" then
  * no real panel is launched, a domain  desktop layout file is included.
  *
  * Domain desktop layout files are stored in the folder
  * core/classes/innomatic/desktop/layout/domain.
  *
  * @param string $resource Panel name.
  */
 public function executeDomain($resource)
 {
     // Check if this is the default page and if the user is allowed to access the dashboard
     if (substr($resource, -1, 1) == '/') {
         $perm = new \Innomatic\Desktop\Auth\DesktopPanelAuthorizator($this->container->getCurrentDomain()->getDataAccess(), $this->container->getCurrentUser()->getGroup());
         $node_id = $perm->getNodeIdFromFileName('dashboard');
         if ($perm->check($node_id, \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODETYPE_PAGE) != \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODE_NOTENABLED) {
             $resource = $resource . 'dashboard';
         }
     }
     if (substr($resource, -1, 1) != '/') {
         // Must exit if the user called a page for which he isn't enabled
         //
         if (!isset($perm)) {
             $perm = new \Innomatic\Desktop\Auth\DesktopPanelAuthorizator($this->container->getCurrentDomain()->getDataAccess(), $this->container->getCurrentUser()->getGroup());
         }
         $desktopPanel = basename($resource);
         if ($this->container->getState() == \Innomatic\Core\InnomaticContainer::STATE_DEBUG) {
             $dump = \Innomatic\Debug\InnomaticDump::instance('\\Innomatic\\Debug\\InnomaticDump');
             $dump->desktopApplication = $desktopPanel;
             $dump->sessionId = $this->session->getId();
         }
         switch ($desktopPanel) {
             case 'index':
                 break;
             default:
                 $node_id = $perm->getNodeIdFromFileName($desktopPanel);
                 if ($node_id) {
                     if ($perm->check($node_id, \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODETYPE_PAGE) == \Innomatic\Desktop\Auth\DesktopPanelAuthorizator::NODE_NOTENABLED) {
                         $adloc = new \Innomatic\Locale\LocaleCatalog('innomatic::authentication', $this->container->getCurrentUser()->getLanguage());
                         $this->container->abort($adloc->getStr('nopageauth'));
                     }
                 } else {
                     $adloc = new \Innomatic\Locale\LocaleCatalog('innomatic::authentication', $this->container->getCurrentUser()->getLanguage());
                     $this->container->abort($adloc->getStr('nopageauth'));
                 }
         }
         if (is_dir($resource . '-panel')) {
             $panelHome = $resource . '-panel/';
             $panelName = basename($resource);
             $controllerClassName = ucfirst($panelName) . 'PanelController';
             // Checks if view file and definition exist
             if (!(include_once $panelHome . $controllerClassName . '.php')) {
                 throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::MISSING_CONTROLLER_FILE);
             }
             if (!class_exists($controllerClassName, true)) {
                 throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::MISSING_CONTROLLER_CLASS);
             }
             $controller = new $controllerClassName(\Innomatic\Core\InnomaticContainer::MODE_DOMAIN, $panelName);
             $this->container->setPanelController($controller);
         } else {
             switch ($desktopPanel) {
                 case 'menu':
                     include 'innomatic/desktop/layout/domain/' . $desktopPanel . '.php';
                     break;
                 default:
                     include $resource . '.php';
             }
         }
     } else {
         if (strlen($this->session->get('INNOMATIC_AUTH_USER'))) {
             \Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getResponse()->addHeader('P3P', 'CP="CUR ADM OUR NOR STA NID"');
             include 'innomatic/desktop/layout/domain/index.php';
         }
     }
 }
开发者ID:kchizi,项目名称:innomatic-legacy,代码行数:77,代码来源:DesktopFrontController.php


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