reorder code and files, remove the filtered source dir implementation
[pharext/pharext] / src / pharext / PharextSourceDir.php
diff --git a/src/pharext/PharextSourceDir.php b/src/pharext/PharextSourceDir.php
deleted file mode 100644 (file)
index e0d9a2a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-namespace pharext;
-
-class PharextSourceDir implements \IteratorAggregate, SourceDir
-{
-       private $cmd;
-       private $path;
-       private $iter;
-       
-       public function __construct(Command $cmd, $path) {
-               $this->cmd = $cmd;
-               $this->path = $path;
-               
-               $callable = include "$path/pharext_package.php";
-               if (!is_callable($callable)) {
-                       throw new \Exception("Package hook did not return a callable");
-               }
-               $this->iter = $callable($cmd, $path);
-       }
-       
-       public function getBaseDir() {
-               return $this->path;
-       }
-       
-       public function getIterator() {
-               if (!is_callable($this->iter)) {
-                       throw new \Exception("Package hook callback did not return a callable");
-               } 
-               return call_user_func($this->iter, $this->cmd, $this->path);
-       } 
-}
\ No newline at end of file