ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($name, array $children=[], Collection $parent=null) | |
Creates the object. More... | |
getName () | |
Returns the name of the node. More... | |
createFile ($name, $data=null) | |
Creates a new file in the directory. More... | |
createDirectory ($name) | |
Creates a new subdirectory. More... | |
getChildren () | |
Returns an array with all the child nodes. More... | |
addNode (\Sabre\DAV\INode $node) | |
Adds an already existing node to this collection. More... | |
deleteChild ($name) | |
Removes a childnode from this node. More... | |
delete () | |
Deletes this collection and all its children,. More... | |
![]() | |
getChild ($name) | |
Returns a child object, by its name. More... | |
childExists ($name) | |
Checks is a child-node exists. More... | |
createFile ($name, $data=null) | |
Creates a new file in the directory. More... | |
createDirectory ($name) | |
Creates a new subdirectory. More... | |
![]() | |
getLastModified () | |
Returns the last modification time as a unix timestamp. More... | |
delete () | |
Deletes the current node. More... | |
setName ($name) | |
Renames the node. More... | |
Protected Attributes | |
$name | |
$children | |
$parent | |
This collection quickly allows you to create trees of nodes. Children are specified as an array.
Every key a filename, every array value is either:
Definition at line 22 of file Collection.php.
Sabre\DAV\Mock\Collection::__construct | ( | $name, | |
array | $children = [] , |
||
Collection | $parent = null |
||
) |
Creates the object.
string | $name | |
array | $children | |
Collection | $parent |
Definition at line 36 of file Collection.php.
References Sabre\DAV\Mock\Collection\$children, $key, $name, and Sabre\DAV\Mock\Collection\$parent.
Sabre\DAV\Mock\Collection::addNode | ( | \Sabre\DAV\INode | $node | ) |
Adds an already existing node to this collection.
\Sabre\DAV\INode | $node |
Definition at line 129 of file Collection.php.
Sabre\DAV\Mock\Collection::createDirectory | ( | $name | ) |
Creates a new subdirectory.
string | $name |
Implements Sabre\DAV\ICollection.
Definition at line 107 of file Collection.php.
References $name.
Sabre\DAV\Mock\Collection::createFile | ( | $name, | |
$data = null |
|||
) |
Creates a new file in the directory.
Data will either be supplied as a stream resource, or in certain cases as a string. Keep in mind that you may have to support either.
After successful creation of the file, you may choose to return the ETag of the new file here.
The returned ETag must be surrounded by double-quotes (The quotes should be part of the actual string).
If you cannot accurately determine the ETag, you should not return it. If you don't store the file exactly as-is (you're transforming it somehow) you should also not return an ETag.
This means that if a subsequent GET to this new file does not exactly return the same contents of what was submitted here, you are strongly recommended to omit the ETag.
string | $name | Name of the file |
resource | string | $data | Initial payload |
Implements Sabre\DAV\ICollection.
Definition at line 91 of file Collection.php.
Sabre\DAV\Mock\Collection::delete | ( | ) |
Deletes this collection and all its children,.
Implements Sabre\DAV\INode.
Definition at line 159 of file Collection.php.
References Sabre\DAV\Mock\Collection\deleteChild(), Sabre\DAV\ICollection\getChildren(), and Sabre\DAV\INode\getName().
Sabre\DAV\Mock\Collection::deleteChild | ( | $name | ) |
Removes a childnode from this node.
string | $name |
Definition at line 141 of file Collection.php.
Referenced by Sabre\DAV\Mock\Collection\delete().
Sabre\DAV\Mock\Collection::getChildren | ( | ) |
Returns an array with all the child nodes.
Implements Sabre\DAV\ICollection.
Definition at line 118 of file Collection.php.
Sabre\DAV\Mock\Collection::getName | ( | ) |
Returns the name of the node.
This is used to generate the url.
Implements Sabre\DAV\INode.
Definition at line 61 of file Collection.php.
References $name.
|
protected |
Definition at line 25 of file Collection.php.
Referenced by Sabre\DAV\Mock\Collection\__construct().
|
protected |
Definition at line 24 of file Collection.php.
|
protected |
Definition at line 26 of file Collection.php.
Referenced by Sabre\DAV\Mock\Collection\__construct().