ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\FS\Collection Class Reference

This is an ACL-enabled collection. More...

+ Inheritance diagram for Sabre\DAVACL\FS\Collection:
+ Collaboration diagram for Sabre\DAVACL\FS\Collection:

Public Member Functions

 __construct ($path, array $acl, $owner=null)
 Constructor. More...
 
 getChild ($name)
 Returns a specific child node, referenced by its name. More...
 
 getOwner ()
 Returns the owner principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
- Public Member Functions inherited from Sabre\DAV\FSExt\Directory
 createFile ($name, $data=null)
 Creates a new file in the directory. More...
 
 createDirectory ($name)
 Creates a new subdirectory. More...
 
 getChild ($name)
 Returns a specific child node, referenced by its name. More...
 
 childExists ($name)
 Checks if a child exists. More...
 
 getChildren ()
 Returns an array with all the child nodes. More...
 
 delete ()
 Deletes all files in this directory, and then itself. More...
 
 getQuotaInfo ()
 Returns available diskspace information. More...
 
 moveInto ($targetName, $sourcePath, DAV\INode $sourceNode)
 Moves a node into this collection. More...
 
- Public Member Functions inherited from Sabre\DAV\FS\Node
 __construct ($path)
 Sets up the node, expects a full path name. More...
 
 getName ()
 Returns the name of the node. More...
 
 setName ($name)
 Renames the node. More...
 
 getLastModified ()
 Returns the last modification time, as a unix timestamp. More...
 
- Public Member Functions inherited from Sabre\DAV\IMoveTarget
 moveInto ($targetName, $sourcePath, INode $sourceNode)
 Moves a node into this collection. More...
 
- Public Member Functions inherited from Sabre\DAVACL\IACL
 getGroup ()
 Returns a group principal. More...
 
 setACL (array $acl)
 Updates the ACL. More...
 
 getSupportedPrivilegeSet ()
 Returns the list of supported privileges for this node. More...
 

Protected Attributes

 $acl
 
 $owner
 
- Protected Attributes inherited from Sabre\DAV\FS\Node
 $path
 

Detailed Description

This is an ACL-enabled collection.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 18 of file Collection.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\DAVACL\FS\Collection::__construct (   $path,
array  $acl,
  $owner = null 
)

Constructor.

Parameters
string$pathon-disk path.
array$aclACL rules.
string | null$ownerprincipal owner string.

Definition at line 43 of file Collection.php.

References Sabre\DAVACL\FS\Collection\$acl, Sabre\DAVACL\FS\Collection\$owner, and Sabre\DAV\FS\Node\$path.

43  {
44 
45  parent::__construct($path);
46  $this->acl = $acl;
47  $this->owner = $owner;
48 
49  }

Member Function Documentation

◆ getACL()

Sabre\DAVACL\FS\Collection::getACL ( )

Returns a list of ACE's for this node.

Each ACE has the following properties:

  • 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges
  • 'principal', a url to the principal who owns the node
  • 'protected' (optional), indicating that this ACE is not allowed to be updated.
Returns
array

Implements Sabre\DAVACL\IACL.

Definition at line 105 of file Collection.php.

References Sabre\DAVACL\FS\Collection\$acl.

105  {
106 
107  return $this->acl;
108 
109  }

◆ getChild()

Sabre\DAVACL\FS\Collection::getChild (   $name)

Returns a specific child node, referenced by its name.

This method must throw Sabre if the node does not exist.

Parameters
string$name
Exceptions
NotFound
Returns

Implements Sabre\DAV\ICollection.

Definition at line 61 of file Collection.php.

References Sabre\DAVACL\FS\Collection\$acl, $name, Sabre\DAVACL\FS\Collection\$owner, and Sabre\DAV\FS\Node\$path.

61  {
62 
63  $path = $this->path . '/' . $name;
64 
65  if (!file_exists($path)) throw new NotFound('File could not be located');
66  if ($name == '.' || $name == '..') throw new Forbidden('Permission denied to . and ..');
67 
68  if (is_dir($path)) {
69 
70  return new self($path, $this->acl, $this->owner);
71 
72  } else {
73 
74  return new File($path, $this->acl, $this->owner);
75 
76  }
77 
78  }

◆ getOwner()

Sabre\DAVACL\FS\Collection::getOwner ( )

Returns the owner principal.

This must be a url to a principal, or null if there's no owner

Returns
string|null

Implements Sabre\DAVACL\IACL.

Definition at line 87 of file Collection.php.

References Sabre\DAVACL\FS\Collection\$owner.

87  {
88 
89  return $this->owner;
90 
91  }

Field Documentation

◆ $acl

Sabre\DAVACL\FS\Collection::$acl
protected

◆ $owner

Sabre\DAVACL\FS\Collection::$owner
protected

The documentation for this class was generated from the following file: