Author: ts
Date: Wed Sep 19 16:13:50 2007
New Revision: 6205
Log:
- Implemented parsing of MKCOL request.
Added:
trunk/Webdav/tests/clients/rfc/mkcol/request/result.ser (with props)
Modified:
trunk/Webdav/src/transport.php
Modified: trunk/Webdav/src/transport.php
==============================================================================
--- trunk/Webdav/src/transport.php [iso-8859-1] (original)
+++ trunk/Webdav/src/transport.php [iso-8859-1] Wed Sep 19 16:13:50 2007
@@ -63,6 +63,8 @@
return $this->parseLockRequest( $uri, $body );
case 'UNLOCK':
return $this->parseUnlockRequest( $uri, $body );
+ case 'MKCOL':
+ return $this->parseMakeCollectionRequest( $uri, $body );
default:
throw new ezcWebdavInvalidRequestMethodException(
$_SERVER['REQUEST_METHOD']
@@ -267,6 +269,13 @@
return $this->parsePropertyBehaviourContent( $dom, $request );
}
+ /**
+ * Parses the <propertybehavior /> XML element.
+ *
+ * @param DOMDocument $dom
+ * @param ezcWebdavRequest $request
+ * @return ezcWebdavRequest
+ */
protected function parsePropertyBehaviourContent( DOMDocument $dom,
ezcWebdavRequest $request )
{
$propertyBehaviourNode = $dom->documentElement;
@@ -419,6 +428,24 @@
);
return $request;
+ }
+
+ // MKCOL
+
+ /**
+ * Parses the MKCOL request and returns a request object.
+ * This method is responsible for parsing the MKCOL request. It
+ * retrieves the current request URI in $uri and the request body as $body.
+ * The return value, if no exception is thrown, is a valid [EMAIL
PROTECTED]
+ * ezcWebdavMakeCollectionRequest} object.
+ *
+ * @param string $uri
+ * @param string $body
+ * @return ezcWebdavMakeCollectionRequest
+ */
+ protected function parseMakeCollectionRequest( $uri, $body )
+ {
+ return new ezcWebdavMakeCollectionRequest( $uri, ( trim( $body ) ===
'' ? null : $body ) );
}
// PROPFIND
Added: trunk/Webdav/tests/clients/rfc/mkcol/request/result.ser
==============================================================================
Binary file - no diff available.
Propchange: trunk/Webdav/tests/clients/rfc/mkcol/request/result.ser
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components