Author: kn
Date: Thu Sep 20 14:28:15 2007
New Revision: 6224
Log:
- Use more of the abstraction layer
Modified:
trunk/Webdav/src/backend/memory.php
trunk/Webdav/src/backend/simple.php
Modified: trunk/Webdav/src/backend/memory.php
==============================================================================
--- trunk/Webdav/src/backend/memory.php [iso-8859-1] (original)
+++ trunk/Webdav/src/backend/memory.php [iso-8859-1] Thu Sep 20 14:28:15 2007
@@ -310,6 +310,17 @@
}
/**
+ * Get contents of a resource.
+ *
+ * @param string $path
+ * @return string
+ */
+ protected function getResourceContents( $path )
+ {
+ return $this->content[$path];
+ }
+
+ /**
* Manually set a property on a resource to request it later.
*
* @param string $resource
Modified: trunk/Webdav/src/backend/simple.php
==============================================================================
--- trunk/Webdav/src/backend/simple.php [iso-8859-1] (original)
+++ trunk/Webdav/src/backend/simple.php [iso-8859-1] Thu Sep 20 14:28:15 2007
@@ -62,6 +62,14 @@
abstract protected function setResourceContents( $path, $content );
/**
+ * Get contents of a resource.
+ *
+ * @param string $path
+ * @return string
+ */
+ abstract protected function getResourceContents( $path );
+
+ /**
* Manually set a property on a resource to request it later.
*
* @param string $resource
@@ -214,8 +222,8 @@
return new ezcWebdavGetResourceResponse(
new ezcWebdavResource(
$source,
- $this->props[$source],
- $this->content[$source]
+ $this->getAllProperties( $source ),
+ $this->getResourceContents( $source )
)
);
}
@@ -224,7 +232,7 @@
return new ezcWebdavGetCollectionResponse(
new ezcWebdavCollection(
$source,
- $this->props[$source],
+ $this->getAllProperties( $source ),
$this->getCollectionMembers( $source )
)
);
@@ -260,7 +268,7 @@
return new ezcWebdavHeadResponse(
new ezcWebdavResource(
$source,
- $this->props[$source]
+ $this->getAllProperties( $source )
)
);
}
@@ -270,7 +278,7 @@
return new ezcWebdavHeadResponse(
new ezcWebdavCollection(
$source,
- $this->props[$source]
+ $this->getAllProperties( $source )
)
);
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components