ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjMountPointDAV.php
Go to the documentation of this file.
1 <?php
2 // BEGIN WebDAV
3 /*
4  +-----------------------------------------------------------------------------+
5  | ILIAS open source |
6  +-----------------------------------------------------------------------------+
7  | Copyright (c) 1998-2005 ILIAS open source, University of Cologne |
8  | |
9  | This program is free software; you can redistribute it and/or |
10  | modify it under the terms of the GNU General Public License |
11  | as published by the Free Software Foundation; either version 2 |
12  | of the License, or (at your option) any later version. |
13  | |
14  | This program is distributed in the hope that it will be useful, |
15  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17  | GNU General Public License for more details. |
18  | |
19  | You should have received a copy of the GNU General Public License |
20  | along with this program; if not, write to the Free Software |
21  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
22  +-----------------------------------------------------------------------------+
23 */
24 
25 require_once "class.ilObjectDAV.php";
26 require_once "Modules/Category/classes/class.ilObjCategory.php";
27 
41 {
42  public $data;
48  public function __construct()
49  {
50  parent::__construct(-1);
51  }
52 
58  public function getObjectId()
59  {
60  return -1;
61  }
68  public function read()
69  {
70  }
77  public function write()
78  {
79  }
85  public function getResourceName()
86  {
87  return '';
88  }
94  public function getDisplayName()
95  {
96  return '';
97  }
103  public function getCreationTimestamp()
104  {
105  return strtotime('2000-01-01');
106  }
107 
113  public function getModificationTimestamp()
114  {
115  return strtotime('2000-01-01');
116  }
122  public function getResourceType()
123  {
124  return "collection";
125  }
126 
131  public function getContentType()
132  {
133  return 'httpd/unix-directory';
134  }
139  public function getContentLength()
140  {
141  return 0;
142  }
143  public function isPermitted($actions, $type='')
144  {
145  // All users have "visible" and "read" access to the mount point
146  $a = explode(',', $actions);
147  foreach ($a as $action) {
148  switch ($action) {
149  case 'read':
150  case 'visible':
151  break;
152  default:
153  return false;
154  }
155  }
156  return true;
157  }
164  public function children()
165  {
166  global $DIC;
167  $tree = $DIC['tree'];
168 
169  $childrenDAV = array();
170  $data =&$tree->getNodeData($tree->getRootId());
171  $childDAV =&ilObjectDAV::createObject($data['ref_id'], 'root');
172  if (!is_null($childDAV)) {
173  // Note: We must not assign with =& here, because this will cause trouble
174  // when other functions attempt to work with the $childrenDAV array.
175  $childrenDAV[] = $childDAV;
176  }
177  return $childrenDAV;
178  }
179 }
180 // END WebDAV
getObjectId()
Returns the object id of this object.
static createObject($refId, $type)
Static factory method to create a DAV object for a given refId and type.
$action
getContentType()
Returns the mime type of the content of this object.
$type
global $DIC
Definition: saml.php:7
getCreationTimestamp()
Returns the creation timestamp of this object.
getDisplayName()
Returns the file name of this object.
getContentLength()
Returns the number of bytes of the content.
getModificationTimestamp()
Returns the modification timestamp of this object.
children()
Returns the children of this object.
read()
Reads the object data.
Create styles array
The data for the language used.
getResourceType()
Returns the DAV resource type of this object.
write()
Writes the object data.
isPermitted($actions, $type='')
getResourceName()
Returns the file name of this object.