[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Copyright (C) 2005-2010 Alfresco Software Limited. 4 * 5 * This file is part of Alfresco 6 * 7 * Alfresco is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU Lesser General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * Alfresco is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public License 18 * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 /** 22 * Version history class. 23 * 24 * @author Roy Wetherall 25 */ 26 class VersionHistory extends BaseObject 27 { 28 /** Node to which this version history relates */ 29 private $_node; 30 31 /** Array of versions */ 32 private $_versions; 33 34 /** 35 * Constructor 36 * 37 * @param $node the node that this version history apples to 38 */ 39 public function __construct($node) 40 { 41 $this->_node = $node; 42 $this->populateVersionHistory(); 43 } 44 45 /** 46 * Get the node that this version history relates to 47 */ 48 public function getNode() 49 { 50 return $this->_node; 51 } 52 53 /** 54 * Get a list of the versions in the version history 55 */ 56 public function getVersions() 57 { 58 return $this->_versions; 59 } 60 61 /** 62 * Populate the version history 63 */ 64 private function populateVersionHistory() 65 { 66 // Use the web service API to get the version history for this node 67 $client = WebServiceFactory::getAuthoringService($this->_node->session->repository->connectionUrl, $this->_node->session->ticket); 68 $result = $client->getVersionHistory(array("node" => $this->_node->__toArray())); 69 //var_dump($result); 70 71 // TODO populate the version history from the result of the web service call 72 } 73 } 74 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |