|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Inheritance diagram for Sabre\DAV\SimpleFile:
Collaboration diagram for Sabre\DAV\SimpleFile:Public Member Functions | |
| __construct ($name, $contents, $mimeType=null) | |
| Creates this node. More... | |
| getName () | |
| Returns the node name for this file. More... | |
| get () | |
| Returns the data. More... | |
| getSize () | |
| Returns the size of the file, in bytes. More... | |
| getETag () | |
| Returns the ETag for a file. More... | |
| getContentType () | |
| Returns the mime-type for a file. More... | |
Public Member Functions inherited from Sabre\DAV\File | |
| put ($data) | |
| Replaces the contents of the file. More... | |
| get () | |
| Returns the data. More... | |
| getSize () | |
| Returns the size of the file, in bytes. More... | |
| getETag () | |
| Returns the ETag for a file. More... | |
| getContentType () | |
| Returns the mime-type for a file. 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... | |
| delete () | |
| Deleted the current node. 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... | |
| put ($data) | |
| Replaces the contents of the file. More... | |
| get () | |
| Returns the data. More... | |
| getContentType () | |
| Returns the mime-type for a file. More... | |
| getETag () | |
| Returns the ETag for a file. More... | |
| getSize () | |
| Returns the size of the node, in bytes. More... | |
Protected Attributes | |
| $contents = [] | |
| $name | |
| $mimeType | |
The 'SimpleFile' class is used to easily add read-only immutable files to the directory structure. One usecase would be to add a 'readme.txt' to a root of a webserver with some standard content.
Definition at line 16 of file SimpleFile.php.
| Sabre\DAV\SimpleFile::__construct | ( | $name, | |
| $contents, | |||
$mimeType = null |
|||
| ) |
Creates this node.
The name of the node must be passed, as well as the contents of the file.
| string | $name | |
| string | $contents | |
| string | null | $mimeType |
Definition at line 49 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$contents, Sabre\DAV\SimpleFile\$mimeType, and Sabre\DAV\SimpleFile\$name.
| Sabre\DAV\SimpleFile::get | ( | ) |
Returns the data.
This method may either return a string or a readable stream resource
Reimplemented from Sabre\DAV\File.
Definition at line 77 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$contents.
| Sabre\DAV\SimpleFile::getContentType | ( | ) |
Returns the mime-type for a file.
If null is returned, we'll assume application/octet-stream
Reimplemented from Sabre\DAV\File.
Definition at line 115 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$mimeType.
| Sabre\DAV\SimpleFile::getETag | ( | ) |
Returns the ETag for a file.
An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. The ETag is an arbitrary string, but MUST be surrounded by double-quotes.
Return null if the ETag can not effectively be determined
Reimplemented from Sabre\DAV\File.
Definition at line 103 of file SimpleFile.php.
| Sabre\DAV\SimpleFile::getName | ( | ) |
Returns the node name for this file.
This name is used to construct the url.
Implements Sabre\DAV\INode.
Definition at line 64 of file SimpleFile.php.
References Sabre\DAV\SimpleFile\$name.
| Sabre\DAV\SimpleFile::getSize | ( | ) |
Returns the size of the file, in bytes.
Reimplemented from Sabre\DAV\File.
Definition at line 88 of file SimpleFile.php.
|
protected |
Definition at line 23 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\get().
|
protected |
Definition at line 37 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\getContentType().
|
protected |
Definition at line 30 of file SimpleFile.php.
Referenced by Sabre\DAV\SimpleFile\__construct(), and Sabre\DAV\SimpleFile\getName().