aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
commit0b02a6d123b2014705998c94ddf3d460948d3eac (patch)
tree78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php
parent40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff)
downloadvolse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php')
-rw-r--r--vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php108
1 files changed, 0 insertions, 108 deletions
diff --git a/vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php b/vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php
deleted file mode 100644
index 1bdb166c7..000000000
--- a/vendor/sabre/dav/lib/Sabre/DAV/SimpleCollection.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-
-namespace Sabre\DAV;
-
-/**
- * SimpleCollection
- *
- * The SimpleCollection is used to quickly setup static directory structures.
- * Just create the object with a proper name, and add children to use it.
- *
- * @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
- * @author Evert Pot (http://evertpot.com/)
- * @license http://sabre.io/license/ Modified BSD License
- */
-class SimpleCollection extends Collection {
-
- /**
- * List of childnodes
- *
- * @var array
- */
- protected $children = array();
-
- /**
- * Name of this resource
- *
- * @var string
- */
- protected $name;
-
- /**
- * Creates this node
- *
- * The name of the node must be passed, child nodes can also be passed.
- * This nodes must be instances of INode
- *
- * @param string $name
- * @param array $children
- */
- public function __construct($name,array $children = array()) {
-
- $this->name = $name;
- foreach($children as $child) {
-
- if (!($child instanceof INode)) throw new Exception('Only instances of Sabre\DAV\INode are allowed to be passed in the children argument');
- $this->addChild($child);
-
- }
-
- }
-
- /**
- * Adds a new childnode to this collection
- *
- * @param INode $child
- * @return void
- */
- public function addChild(INode $child) {
-
- $this->children[$child->getName()] = $child;
-
- }
-
- /**
- * Returns the name of the collection
- *
- * @return string
- */
- public function getName() {
-
- return $this->name;
-
- }
-
- /**
- * Returns a child object, by its name.
- *
- * This method makes use of the getChildren method to grab all the child nodes, and compares the name.
- * Generally its wise to override this, as this can usually be optimized
- *
- * This method must throw Sabre\DAV\Exception\NotFound if the node does not
- * exist.
- *
- * @param string $name
- * @throws Exception\NotFound
- * @return INode
- */
- public function getChild($name) {
-
- if (isset($this->children[$name])) return $this->children[$name];
- throw new Exception\NotFound('File not found: ' . $name . ' in \'' . $this->getName() . '\'');
-
- }
-
- /**
- * Returns a list of children for this collection
- *
- * @return array
- */
- public function getChildren() {
-
- return array_values($this->children);
-
- }
-
-
-}
-