ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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  var $data;
48  function __construct()
49  {
50  parent::__construct(-1);
51  }
52 
58  function getObjectId()
59  {
60  return -1;
61  }
68  function read()
69  {
70  }
77  function write()
78  {
79  }
85  function getResourceName()
86  {
87  return '';
88  }
94  function getDisplayName()
95  {
96  return '';
97  }
104  {
105  return strtotime('2000-01-01');
106  }
107 
114  {
115  return strtotime('2000-01-01');
116  }
122  function getResourceType()
123  {
124  return "collection";
125  }
126 
131  function getContentType()
132  {
133  return 'httpd/unix-directory';
134  }
139  function getContentLength()
140  {
141  return 0;
142  }
143  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  {
149  switch ($action)
150  {
151  case 'read' :
152  case 'visible' :
153  break;
154  default :
155  return false;
156  }
157  }
158  return true;
159  }
166  function children()
167  {
168  global $DIC;
169  $tree = $DIC['tree'];
170 
171  $childrenDAV = array();
172  $data =& $tree->getNodeData($tree->getRootId());
173  $childDAV =& ilObjectDAV::createObject($data['ref_id'],'root');
174  if (! is_null($childDAV))
175  {
176  // Note: We must not assign with =& here, because this will cause trouble
177  // when other functions attempt to work with the $childrenDAV array.
178  $childrenDAV[] = $childDAV;
179  }
180  return $childrenDAV;
181  }
182 }
183 // END WebDAV
184 ?>
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.
getContentType()
Returns the mime type of the content of this object.
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='')
global $DIC
getResourceName()
Returns the file name of this object.