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


PHP InnomaticContainer::getLoadTimer方法代码示例

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


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


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