Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/alfresco/Service/VersionHistory.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  * Copyright (C) 2005 Alfresco, Inc.
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018 
00019  * As a special exception to the terms and conditions of version 2.0 of 
00020  * the GPL, you may redistribute this Program in connection with Free/Libre 
00021  * and Open Source Software ("FLOSS") applications as described in Alfresco's 
00022  * FLOSS exception.  You should have recieved a copy of the text describing 
00023  * the FLOSS exception, and it is also available here: 
00024  * http://www.alfresco.com/legal/licensing"
00025  */
00026  
00032  class VersionHistory extends BaseObject 
00033  {
00035         private $_node;
00036         
00038         private $_versions;
00039         
00045         public function __construct($node) 
00046         { 
00047                 $this->_node = $node;
00048                 $this->populateVersionHistory();
00049         }
00050         
00054         public function getNode()
00055         {
00056                 return $this->_node;
00057         }
00058         
00062         public function getVersions()
00063         {
00064                 return $this->_versions;
00065         }
00066         
00070         private function populateVersionHistory()
00071         {
00072                 // Use the web service API to get the version history for this node
00073                 $client = WebServiceFactory::getAuthoringService($this->_node->session->repository->connectionUrl, $this->_node->session->ticket);
00074                 $result = $client->getVersionHistory(array("node" => $this->_node->__toArray()));
00075                 //var_dump($result);
00076                 
00077                 // TODO populate the version history from the result of the web service call
00078         }
00079  }
00080 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations