ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Collection class. More...
Public Member Functions | |
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... | |
![]() | |
getName () | |
Returns the name of the node. More... | |
![]() | |
getChildren () | |
Returns an array with all the child nodes. More... | |
Collection class.
This is a helper class, that should aid in getting collections classes setup. Most of its methods are implemented, and throw permission denied exceptions
Definition at line 15 of file Collection.php.
Sabre\DAV\Collection::childExists | ( | $name | ) |
Checks is a child-node exists.
It is generally a good idea to try and override this. Usually it can be optimized.
string | $name |
Implements Sabre\DAV\ICollection.
Definition at line 50 of file Collection.php.
References $name, and Sabre\DAV\Collection\getChild().
Sabre\DAV\Collection::createDirectory | ( | $name | ) |
Creates a new subdirectory.
string | $name |
Exception |
Implements Sabre\DAV\ICollection.
Definition at line 102 of file Collection.php.
Sabre\DAV\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 89 of file Collection.php.
References $name.
Sabre\DAV\Collection::getChild | ( | $name | ) |
Returns a child object, by its name.
This method makes use of the getChildren method to grab all the child nodes, and compares the name. Generally its wise to override this, as this can usually be optimized
This method must throw Sabre if the node does not exist.
string | $name |
Exception |
Implements Sabre\DAV\ICollection.
Definition at line 31 of file Collection.php.
References $name, and Sabre\DAV\ICollection\getChildren().
Referenced by Sabre\DAV\Collection\childExists().