ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
put ($str) | |
Replaces the contents of the file. More... | |
patch ($data, $rangeType, $offset=null) | |
Updates the file based on a range specification. More... | |
get () | |
Returns the data. More... | |
getContentType () | |
Returns the mime-type for a file. More... | |
getSize () | |
Returns the size of the node, in bytes. More... | |
getETag () | |
Returns the ETag for a file. More... | |
delete () | |
Deleted the current node. More... | |
setName ($name) | |
Renames the node. More... | |
getName () | |
Returns the name of the node. More... | |
getLastModified () | |
Returns the last modification time, as a unix timestamp. More... | |
Protected Attributes | |
$data = '' | |
Definition at line 7 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::delete | ( | ) |
Deleted the current node.
Implements Sabre\DAV\INode.
Definition at line 97 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::get | ( | ) |
Returns the data.
This method may either return a string or a readable stream resource
Implements Sabre\DAV\IFile.
Definition at line 73 of file FileMock.php.
References $data.
Sabre\DAV\PartialUpdate\FileMock::getContentType | ( | ) |
Returns the mime-type for a file.
If null is returned, we'll assume application/octet-stream
Implements Sabre\DAV\IFile.
Definition at line 79 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::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.
Return null if the ETag can not effectively be determined.
The ETag must be surrounded by double-quotes, so something like this would make a valid ETag:
return '"someetag"';
Implements Sabre\DAV\IFile.
Definition at line 91 of file FileMock.php.
References data.
Sabre\DAV\PartialUpdate\FileMock::getLastModified | ( | ) |
Returns the last modification time, as a unix timestamp.
Return null if the information is not available.
Implements Sabre\DAV\INode.
Definition at line 115 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::getName | ( | ) |
Returns the name of the node.
This is used to generate the url.
Implements Sabre\DAV\INode.
Definition at line 109 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::getSize | ( | ) |
Returns the size of the node, in bytes.
Implements Sabre\DAV\IFile.
Definition at line 85 of file FileMock.php.
References data.
Sabre\DAV\PartialUpdate\FileMock::patch | ( | $data, | |
$rangeType, | |||
$offset = null |
|||
) |
Updates the file based on a range specification.
The first argument is the data, which is either a readable stream resource or a string.
The second argument is the type of update we're doing. This is either:
After a successful put operation, you may choose to return an ETag. The etag must always be surrounded by double-quotes. These quotes must appear in the actual string you're returning.
Clients may use the ETag from a PUT request to later on make sure that when they update the file, the contents haven't changed in the mean time.
resource | string | $data | |
int | $rangeType | |
int | $offset |
Implements Sabre\DAV\PartialUpdate\IPatchSupport.
Definition at line 47 of file FileMock.php.
Sabre\DAV\PartialUpdate\FileMock::put | ( | $data | ) |
Replaces the contents of the file.
The data argument is a readable stream resource.
After a successful put operation, you may choose to return an ETag. The etag must always be surrounded by double-quotes. These quotes must appear in the actual string you're returning.
Clients may use the ETag from a PUT request to later on make sure that when they update the file, the contents haven't changed in the mean time.
If you don't plan to store the file byte-by-byte, and you return a different object on a subsequent GET you are strongly recommended to not return an ETag, and just return null.
resource | string | $data |
Implements Sabre\DAV\IFile.
Definition at line 11 of file FileMock.php.
References data.
Sabre\DAV\PartialUpdate\FileMock::setName | ( | $name | ) |
Renames the node.
string | $name | The new name |
Implements Sabre\DAV\INode.
Definition at line 103 of file FileMock.php.
|
protected |
Definition at line 9 of file FileMock.php.