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


PHP History::getAll方法代码示例

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


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

示例1: testClear

 public function testClear()
 {
     $instance = new History();
     $this->assertTrue($instance->add('foo'));
     $this->assertTrue($instance->add('bar'));
     $this->assertTrue($instance->clear());
     $this->assertEquals([], $instance->getAll());
 }
开发者ID:mlessnau,项目名称:pry,代码行数:8,代码来源:HistoryTest.php

示例2: viewItemHistory

 private function viewItemHistory()
 {
     /* Bail out if the user doesn't have SA permissions. */
     if ($this->_realAccessLevel < ACCESS_LEVEL_DEMO) {
         CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
         return;
         //$this->fatal(ERROR_NO_PERMISSION);
     }
     /* Bail out if we don't have a valid data item type. */
     if (!$this->isRequiredIDValid('dataItemType', $_GET)) {
         CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'Invalid data item type.');
     }
     /* Bail out if we don't have a valid data item ID. */
     if (!$this->isRequiredIDValid('dataItemID', $_GET)) {
         CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'Invalid data item ID.');
     }
     $dataItemType = $_GET['dataItemType'];
     $dataItemID = $_GET['dataItemID'];
     switch ($dataItemType) {
         case DATA_ITEM_CANDIDATE:
             $candidates = new Candidates($this->_siteID);
             $data = $candidates->get($dataItemID);
             break;
         case DATA_ITEM_JOBORDER:
             $jobOrders = new JobOrders($this->_siteID);
             $data = $jobOrders->get($dataItemID);
             break;
         case DATA_ITEM_COMPANY:
             $companies = new Companies($this->_siteID);
             $data = $companies->get($dataItemID);
             break;
         case DATA_ITEM_CONTACT:
             $contacts = new Contacts($this->_siteID);
             $data = $contacts->get($dataItemID);
             break;
         default:
             CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Invalid data item type.');
             break;
     }
     /* Get revision information. */
     $history = new History($this->_siteID);
     $revisionRS = $history->getAll($dataItemType, $dataItemID);
     $this->_template->assign('active', $this);
     $this->_template->assign('subActive', 'Login Activity');
     $this->_template->assign('data', $data);
     $this->_template->assign('revisionRS', $revisionRS);
     $this->_template->display('./modules/settings/ItemHistory.tpl');
 }
开发者ID:rankinp,项目名称:OpenCATS,代码行数:48,代码来源:SettingsUI.php


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