Add an IsCollection() test to the request.

This commit is contained in:
Andrew McMillan 2006-12-04 12:56:02 +13:00
parent 22ffc3c36b
commit 77066997af

View File

@ -145,6 +145,16 @@ class CalDAVRequest
}
/**
* Returns true if the URL referenced by this request points at a collection.
*/
function IsCollection( ) {
if ( !isset($this->_is_collection) ) {
$this->_is_collection = preg_match( '#/$#', $this->path );
}
return $this->_is_collection;
}
/**
* Are we allowed to do the requested activity
*