5 class PharextSourceDir
implements \IteratorAggregate
, SourceDir
11 public function __construct(Command
$cmd, $path) {
15 $callable = include "$path/pharext_package.php";
16 if (!is_callable($callable)) {
17 throw new \
Exception("Package hook did not return a callable");
19 $this->iter
= $callable($cmd, $path);
22 public function getBaseDir() {
26 public function getIterator() {
27 if (!is_callable($this->iter
)) {
28 throw new \
Exception("Package hook callback did not return a callable");
30 return call_user_func($this->iter
, $this->cmd
, $this->path
);