ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\MockACLNode Class Reference
+ Inheritance diagram for Sabre\DAVACL\MockACLNode:
+ Collaboration diagram for Sabre\DAVACL\MockACLNode:

Public Member Functions

 __construct ($name, array $acl=[])
 
 getName ()
 Returns the name of the node. More...
 
 getOwner ()
 Returns the owner principal. More...
 
 getGroup ()
 Returns a group principal. More...
 
 getACL ()
 Returns a list of ACE's for this node. More...
 
 setACL (array $acl)
 Updates the ACL. More...
 
 getSupportedPrivilegeSet ()
 Returns the list of supported privileges for this node. More...
 
- Public Member Functions inherited from Sabre\DAV\Node
 getLastModified ()
 Returns the last modification time as a unix timestamp. More...
 
 delete ()
 Deletes the current node. More...
 
 setName ($name)
 Renames the node. More...
 

Data Fields

 $name
 
 $acl
 

Detailed Description

Definition at line 7 of file MockACLNode.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\DAVACL\MockACLNode::__construct (   $name,
array  $acl = [] 
)

Definition at line 12 of file MockACLNode.php.

References Sabre\DAVACL\MockACLNode\$acl, and Sabre\DAVACL\MockACLNode\$name.

12  {
13 
14  $this->name = $name;
15  $this->acl = $acl;
16 
17  }

Member Function Documentation

◆ getACL()

Sabre\DAVACL\MockACLNode::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 37 of file MockACLNode.php.

References Sabre\DAVACL\MockACLNode\$acl.

37  {
38 
39  return $this->acl;
40 
41  }

◆ getGroup()

Sabre\DAVACL\MockACLNode::getGroup ( )

Returns a group 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 31 of file MockACLNode.php.

31  {
32 
33  return null;
34 
35  }

◆ getName()

Sabre\DAVACL\MockACLNode::getName ( )

Returns the name of the node.

This is used to generate the url.

Returns
string

Implements Sabre\DAV\INode.

Definition at line 19 of file MockACLNode.php.

References Sabre\DAVACL\MockACLNode\$name.

19  {
20 
21  return $this->name;
22 
23  }

◆ getOwner()

Sabre\DAVACL\MockACLNode::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 25 of file MockACLNode.php.

25  {
26 
27  return null;
28 
29  }

◆ getSupportedPrivilegeSet()

Sabre\DAVACL\MockACLNode::getSupportedPrivilegeSet ( )

Returns the list of supported privileges for this node.

The returned data structure is a list of nested privileges. See Sabre::getDefaultSupportedPrivilegeSet for a simple standard structure.

If null is returned from this method, the default privilege set is used, which is fine for most common usecases.

Returns
array|null

Implements Sabre\DAVACL\IACL.

Definition at line 49 of file MockACLNode.php.

49  {
50 
51  return null;
52 
53  }

◆ setACL()

Sabre\DAVACL\MockACLNode::setACL ( array  $acl)

Updates the ACL.

This method will receive a list of new ACE's as an array argument.

Parameters
array$acl
Returns
void

Implements Sabre\DAVACL\IACL.

Definition at line 43 of file MockACLNode.php.

References Sabre\DAVACL\MockACLNode\$acl.

43  {
44 
45  $this->acl = $acl;
46 
47  }

Field Documentation

◆ $acl

Sabre\DAVACL\MockACLNode::$acl

◆ $name

Sabre\DAVACL\MockACLNode::$name

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