[ 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 require_once $CFG->libdir.'/alfresco/Service/BaseObject.php'; 22 require_once $CFG->libdir.'/alfresco/Service/Node.php'; 23 24 class Store extends BaseObject 25 { 26 protected $_session; 27 protected $_address; 28 protected $_scheme; 29 protected $_rootNode; 30 31 public function __construct($session, $address, $scheme = "workspace") 32 { 33 $this->_session = $session; 34 $this->_address = $address; 35 $this->_scheme = $scheme; 36 } 37 38 public function __toString() 39 { 40 return $this->scheme . "://" . $this->address; 41 } 42 43 public function __toArray() 44 { 45 return array( 46 "scheme" => $this->_scheme, 47 "address" => $this->_address); 48 } 49 50 public function getAddress() 51 { 52 return $this->_address; 53 } 54 55 public function getScheme() 56 { 57 return $this->_scheme; 58 } 59 60 public function getRootNode() 61 { 62 if (isset ($this->_rootNode) == false) 63 { 64 $result = $this->_session->repositoryService->get( 65 array( 66 "where" => array( 67 "store" => $this->__toArray()))); 68 69 $this->_rootNode = Node::createFromWebServiceData($this->_session, $result->getReturn); 70 } 71 72 return $this->_rootNode; 73 } 74 } 75 ?>
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 |