Version 1
[yaffs-website] / vendor / mikey179 / vfsStream / src / main / php / org / bovigo / vfs / vfsStreamContainer.php
diff --git a/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php b/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamContainer.php
new file mode 100644 (file)
index 0000000..74faa9a
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+/**
+ * This file is part of vfsStream.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @package  org\bovigo\vfs
+ */
+namespace org\bovigo\vfs;
+/**
+ * Interface for stream contents that are able to store other stream contents.
+ */
+interface vfsStreamContainer extends \IteratorAggregate
+{
+    /**
+     * adds child to the directory
+     *
+     * @param  vfsStreamContent  $child
+     */
+    public function addChild(vfsStreamContent $child);
+
+    /**
+     * removes child from the directory
+     *
+     * @param   string  $name
+     * @return  bool
+     */
+    public function removeChild($name);
+
+    /**
+     * checks whether the container contains a child with the given name
+     *
+     * @param   string  $name
+     * @return  bool
+     */
+    public function hasChild($name);
+
+    /**
+     * returns the child with the given name
+     *
+     * @param   string  $name
+     * @return  vfsStreamContent
+     */
+    public function getChild($name);
+
+    /**
+     * checks whether directory contains any children
+     *
+     * @return  bool
+     * @since   0.10.0
+     */
+    public function hasChildren();
+
+    /**
+     * returns a list of children for this directory
+     *
+     * @return  vfsStreamContent[]
+     */
+    public function getChildren();
+}