Version 1
[yaffs-website] / vendor / alchemy / zippy / src / Resource / Teleporter / TeleporterInterface.php
diff --git a/vendor/alchemy/zippy/src/Resource/Teleporter/TeleporterInterface.php b/vendor/alchemy/zippy/src/Resource/Teleporter/TeleporterInterface.php
new file mode 100644 (file)
index 0000000..afc2d04
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+/*
+ * This file is part of Zippy.
+ *
+ * (c) Alchemy <info@alchemy.fr>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Alchemy\Zippy\Resource\Teleporter;
+
+use Alchemy\Zippy\Exception\InvalidArgumentException;
+use Alchemy\Zippy\Exception\IOException;
+use Alchemy\Zippy\Resource\Resource as ZippyResource;
+
+interface TeleporterInterface
+{
+    /**
+     * Teleports a file from a destination to an other
+     *
+     * @param ZippyResource $resource A Resource
+     * @param string        $context  The current context
+     *
+     * @throws IOException when file could not be written on local
+     * @throws InvalidArgumentException when path to file is not valid
+     */
+    public function teleport(ZippyResource $resource, $context);
+}