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


PHP History::append方法代码示例

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


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

示例1: testPositioning

 public function testPositioning()
 {
     $other_file = tempnam(sys_get_temp_dir() . 'tmp', 'history');
     $el1 = $this->_history->append($other_file);
     $el2 = $this->_history->append($other_file);
     $el3 = $this->_history->append($other_file);
     $this->assertEquals(3, $this->_history->getCount());
     $this->assertEquals($el3, $this->_history->getFirst());
     $this->assertEquals($el1, $this->_history->getLast());
     $this->assertEquals($el2, $this->_history->getNth(1));
     $this->assertEquals($el1, $this->_history->getNext());
     $this->assertFalse($this->_history->getNext());
     unlink($other_file);
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:14,代码来源:HistoryTest.php

示例2: createHistoryLog

 /**
  * Create a history copy of the custom file that will be merged so that it can be access through
  * studio if admins wish to revert at a later date.
  *
  * @param STRING $module - name of the module
  * @param STRING $file - name of the file
  * @param STRING $customFile - Path to the custom file that will be merged
  */
 protected function createHistoryLog($module, $customFile, $file)
 {
     $historyPath = 'custom/' . MB_HISTORYMETADATALOCATION . "/modules/{$module}/metadata/{$file}";
     $history = new History($historyPath);
     $timeStamp = $history->append($customFile);
     $GLOBALS['log']->debug("Created history file after merge with new file: " . $historyPath . '_' . $timeStamp);
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:15,代码来源:SugarMerge.php


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