aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/DAV/ObjectTree.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/DAV/ObjectTree.php')
-rwxr-xr-x[-rw-r--r--]3rdparty/Sabre/DAV/ObjectTree.php63
1 files changed, 31 insertions, 32 deletions
diff --git a/3rdparty/Sabre/DAV/ObjectTree.php b/3rdparty/Sabre/DAV/ObjectTree.php
index f12a3683705..bce51463900 100644..100755
--- a/3rdparty/Sabre/DAV/ObjectTree.php
+++ b/3rdparty/Sabre/DAV/ObjectTree.php
@@ -3,27 +3,27 @@
/**
* ObjectTree class
*
- * This implementation of the Tree class makes use of the INode, IFile and ICollection API's
- *
+ * This implementation of the Tree class makes use of the INode, IFile and ICollection API's
+ *
* @package Sabre
* @subpackage DAV
- * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
/**
- * The root node
- *
+ * The root node
+ *
* @var Sabre_DAV_ICollection
*/
protected $rootNode;
/**
- * This is the node cache. Accessed nodes are stored here
- *
- * @var array
+ * This is the node cache. Accessed nodes are stored here
+ *
+ * @var array
*/
protected $cache = array();
@@ -31,9 +31,8 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
* Creates the object
*
* This method expects the rootObject to be passed as a parameter
- *
- * @param Sabre_DAV_ICollection $rootNode
- * @return void
+ *
+ * @param Sabre_DAV_ICollection $rootNode
*/
public function __construct(Sabre_DAV_ICollection $rootNode) {
@@ -42,10 +41,10 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
}
/**
- * Returns the INode object for the requested path
- *
- * @param string $path
- * @return Sabre_DAV_INode
+ * Returns the INode object for the requested path
+ *
+ * @param string $path
+ * @return Sabre_DAV_INode
*/
public function getNodeForPath($path) {
@@ -54,17 +53,17 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
//if (!$path || $path=='.') return $this->rootNode;
$currentNode = $this->rootNode;
- $i=0;
- // We're splitting up the path variable into folder/subfolder components and traverse to the correct node..
+
+ // We're splitting up the path variable into folder/subfolder components and traverse to the correct node..
foreach(explode('/',$path) as $pathPart) {
// If this part of the path is just a dot, it actually means we can skip it
if ($pathPart=='.' || $pathPart=='') continue;
if (!($currentNode instanceof Sabre_DAV_ICollection))
- throw new Sabre_DAV_Exception_FileNotFound('Could not find node at path: ' . $path);
+ throw new Sabre_DAV_Exception_NotFound('Could not find node at path: ' . $path);
- $currentNode = $currentNode->getChild($pathPart);
+ $currentNode = $currentNode->getChild($pathPart);
}
@@ -76,8 +75,8 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
/**
* This function allows you to check if a node exists.
*
- * @param string $path
- * @return bool
+ * @param string $path
+ * @return bool
*/
public function nodeExists($path) {
@@ -92,7 +91,7 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
if (!$parentNode instanceof Sabre_DAV_ICollection) return false;
return $parentNode->childExists($base);
- } catch (Sabre_DAV_Exception_FileNotFound $e) {
+ } catch (Sabre_DAV_Exception_NotFound $e) {
return false;
@@ -101,10 +100,10 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
}
/**
- * Returns a list of childnodes for a given path.
- *
- * @param string $path
- * @return array
+ * Returns a list of childnodes for a given path.
+ *
+ * @param string $path
+ * @return array
*/
public function getChildren($path) {
@@ -127,14 +126,14 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
* * node creations
* * copy
* * move
- * * renaming nodes
- *
+ * * renaming nodes
+ *
* If Tree classes implement a form of caching, this will allow
* them to make sure caches will be expired.
- *
+ *
* If a path is passed, it is assumed that the entire subtree is dirty
*
- * @param string $path
+ * @param string $path
* @return void
*/
public function markDirty($path) {
@@ -145,7 +144,7 @@ class Sabre_DAV_ObjectTree extends Sabre_DAV_Tree {
foreach($this->cache as $nodePath=>$node) {
if ($nodePath == $path || strpos($nodePath,$path.'/')===0)
unset($this->cache[$nodePath]);
-
+
}
}