ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class holds all the information about a PROPFIND request. More...
Public Member Functions | |
__construct ($path, array $properties, $depth=0, $requestType=self::NORMAL) | |
Creates the PROPFIND object. More... | |
handle ($propertyName, $valueOrCallBack) | |
Handles a specific property. More... | |
set ($propertyName, $value, $status=null) | |
Sets the value of the property. More... | |
get ($propertyName) | |
Returns the current value for a property. More... | |
getStatus ($propertyName) | |
Returns the current status code for a property name. More... | |
setPath ($path) | |
Updates the path for this PROPFIND. More... | |
getPath () | |
Returns the path this PROPFIND request is for. More... | |
getDepth () | |
Returns the depth of this propfind request. More... | |
setDepth ($depth) | |
Updates the depth of this propfind request. More... | |
get404Properties () | |
Returns all propertynames that have a 404 status, and thus don't have a value yet. More... | |
getRequestedProperties () | |
Returns the full list of requested properties. More... | |
isAllProps () | |
Returns true if this was an '{DAV:}allprops' request. More... | |
getResultForMultiStatus () | |
Returns a result array that's often used in multistatus responses. More... | |
Data Fields | |
const | NORMAL = 0 |
A normal propfind. More... | |
const | ALLPROPS = 1 |
An allprops request. More... | |
const | PROPNAME = 2 |
A propname request. More... | |
Protected Attributes | |
$path | |
$depth = 0 | |
$requestType | |
The type of request. More... | |
$properties = [] | |
$result = [] | |
$itemsLeft | |
This class holds all the information about a PROPFIND request.
It contains the type of PROPFIND request, which properties were requested and also the returned items.
Definition at line 11 of file PropFind.php.
Sabre\DAV\PropFind::__construct | ( | $path, | |
array | $properties, | ||
$depth = 0 , |
|||
$requestType = self::NORMAL |
|||
) |
Creates the PROPFIND object.
string | $path | |
array | $properties | |
int | $depth | |
int | $requestType |
Definition at line 43 of file PropFind.php.
References Sabre\DAV\PropFind\$depth, Sabre\DAV\PropFind\$path, Sabre\DAV\PropFind\$properties, and Sabre\DAV\PropFind\$requestType.
Sabre\DAV\PropFind::get | ( | $propertyName | ) |
Returns the current value for a property.
string | $propertyName |
Definition at line 149 of file PropFind.php.
Referenced by Sabre\DAV\CorePlugin\propFindLate().
Sabre\DAV\PropFind::get404Properties | ( | ) |
Returns all propertynames that have a 404 status, and thus don't have a value yet.
Definition at line 222 of file PropFind.php.
References Sabre\DAV\PropFind\$result.
Referenced by Sabre\DAV\PropertyStorage\Backend\PDO\propFind(), and Sabre\DAV\CorePlugin\propFindNode().
Sabre\DAV\PropFind::getDepth | ( | ) |
Returns the depth of this propfind request.
Definition at line 198 of file PropFind.php.
References Sabre\DAV\PropFind\$depth.
Referenced by Sabre\DAV\Server\generatePathNodes().
Sabre\DAV\PropFind::getPath | ( | ) |
Returns the path this PROPFIND request is for.
Definition at line 187 of file PropFind.php.
References Sabre\DAV\PropFind\$path.
Referenced by Sabre\DAV\Server\generatePathNodes(), Sabre\DAV\Browser\GuessContentType\propFind(), Sabre\DAV\PropertyStorage\Plugin\propFind(), Sabre\CalDAV\Schedule\Plugin\propFind(), Sabre\DAV\CorePlugin\propFind(), and Sabre\DAV\CorePlugin\propFindLate().
Sabre\DAV\PropFind::getRequestedProperties | ( | ) |
Returns the full list of requested properties.
This returns just their names, not a status or value.
Definition at line 244 of file PropFind.php.
References Sabre\DAV\PropFind\$properties.
Sabre\DAV\PropFind::getResultForMultiStatus | ( | ) |
Returns a result array that's often used in multistatus responses.
The array uses status codes as keys, and property names and value pairs as the value of the top array.. such as :
[ 200 => [ '{DAV:}displayname' => 'foo' ], ]
Definition at line 273 of file PropFind.php.
Sabre\DAV\PropFind::getStatus | ( | $propertyName | ) |
Returns the current status code for a property name.
If the property does not appear in the list of requested properties, null will be returned.
string | $propertyName |
Definition at line 164 of file PropFind.php.
Referenced by Sabre\CalDAV\Subscriptions\Plugin\propFind().
Sabre\DAV\PropFind::handle | ( | $propertyName, | |
$valueOrCallBack | |||
) |
Handles a specific property.
This method checks whether the specified property was requested in this PROPFIND request, and if so, it will call the callback and use the return value for it's value.
Example:
$propFind->handle('{DAV:}displayname', function() { return 'hello'; });
Note that handle will only work the first time. If null is returned, the value is ignored.
It's also possible to not pass a callback, but immediately pass a value
string | $propertyName | |
mixed | $valueOrCallBack |
Definition at line 94 of file PropFind.php.
Referenced by Sabre\DAV\Browser\GuessContentType\propFind(), Sabre\CalDAV\Notifications\Plugin\propFind(), Sabre\DAV\Sharing\Plugin\propFind(), Sabre\CalDAV\Schedule\Plugin\propFind(), Sabre\DAV\CorePlugin\propFind(), and Sabre\DAV\CorePlugin\propFindLate().
Sabre\DAV\PropFind::isAllProps | ( | ) |
Returns true if this was an '{DAV:}allprops' request.
Definition at line 255 of file PropFind.php.
Referenced by Sabre\DAV\PropertyStorage\Backend\PDO\propFind().
Sabre\DAV\PropFind::set | ( | $propertyName, | |
$value, | |||
$status = null |
|||
) |
Sets the value of the property.
If status is not supplied, the status will default to 200 for non-null properties, and 404 for null properties.
string | $propertyName | |
mixed | $value | |
int | $status |
Definition at line 121 of file PropFind.php.
Referenced by Sabre\DAV\PropertyStorage\Backend\Mock\propFind(), Sabre\CalDAV\Subscriptions\Plugin\propFind(), Sabre\DAV\PropertyStorage\Backend\PDO\propFind(), Sabre\CalDAV\Schedule\Plugin\propFind(), and Sabre\DAV\CorePlugin\propFindNode().
Sabre\DAV\PropFind::setDepth | ( | $depth | ) |
Updates the depth of this propfind request.
int | $depth |
Definition at line 210 of file PropFind.php.
References Sabre\DAV\PropFind\$depth.
Referenced by Sabre\DAV\Server\generatePathNodes().
Sabre\DAV\PropFind::setPath | ( | $path | ) |
Updates the path for this PROPFIND.
string | $path |
Definition at line 176 of file PropFind.php.
References Sabre\DAV\PropFind\$path.
|
protected |
Definition at line 307 of file PropFind.php.
Referenced by Sabre\DAV\PropFind\__construct(), Sabre\DAV\PropFind\getDepth(), and Sabre\DAV\PropFind\setDepth().
|
protected |
Definition at line 345 of file PropFind.php.
|
protected |
Definition at line 297 of file PropFind.php.
Referenced by Sabre\DAV\Browser\PropFindAll\__construct(), Sabre\DAV\PropFind\__construct(), Sabre\DAV\PropFind\getPath(), and Sabre\DAV\PropFind\setPath().
|
protected |
Definition at line 319 of file PropFind.php.
Referenced by Sabre\DAV\PropFind\__construct(), and Sabre\DAV\PropFind\getRequestedProperties().
|
protected |
The type of request.
See the TYPE constants
Definition at line 312 of file PropFind.php.
Referenced by Sabre\DAV\PropFind\__construct().
|
protected |
Definition at line 337 of file PropFind.php.
Referenced by Sabre\DAV\Browser\PropFindAll\get404Properties(), and Sabre\DAV\PropFind\get404Properties().
const Sabre\DAV\PropFind::ALLPROPS = 1 |
An allprops request.
While this was originally intended for instructing the server to really fetch every property, because it was used so often and it's so heavy this turned into a small list of default properties after a while.
So 'all properties' now means a hardcoded list.
Definition at line 27 of file PropFind.php.
Referenced by Sabre\DAV\Server\getPropertiesIteratorForPath(), Sabre\DAV\PropFindTest\testAllPropDefaults(), and Sabre\DAV\PropFindTest\testSetAllpropCustom().
const Sabre\DAV\PropFind::NORMAL = 0 |
A normal propfind.
Definition at line 16 of file PropFind.php.
Referenced by Sabre\DAV\Server\getPropertiesIteratorForPath().
const Sabre\DAV\PropFind::PROPNAME = 2 |
A propname request.
This just returns a list of properties that are defined on a node, without their values.
Definition at line 33 of file PropFind.php.