aboutsummaryrefslogtreecommitdiffstats
path: root/Bin
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-12-09 17:18:59 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-12-11 08:59:02 +0100
commit96268fc58438e33be80f594479e8c8724c4d3a6a (patch)
tree941068509de70759887862b2191c49631658d610 /Bin
parent3c92894fb24a3689143ef00a48f4f3934f27d48a (diff)
downloadPraspel-96268fc58438e33be80f594479e8c8724c4d3a6a.zip
Praspel-96268fc58438e33be80f594479e8c8724c4d3a6a.tar.gz
Praspel-96268fc58438e33be80f594479e8c8724c4d3a6a.tar.bz2
Consistency: Remove `from` calls.
Diffstat (limited to 'Bin')
-rw-r--r--Bin/Shell.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/Bin/Shell.php b/Bin/Shell.php
index c3ee788..7706f3d 100644
--- a/Bin/Shell.php
+++ b/Bin/Shell.php
@@ -93,18 +93,21 @@ class Shell extends Console\Dispatcher\Kit
$interpreter = new Praspel\Visitor\Interpreter();
$dump = new Praspel\Visitor\Compiler();
$interpreter->visit($compiler->parse('@requires;'));
- $words = [];
- from('Hoathis or Hoa')
- -> foreachImport('Realdom.*', function ($classname) use (&$words) {
- $class = new \ReflectionClass($classname);
+ $iterator = new \RegexIterator(
+ new \DirectoryIterator('hoa://Library/Realdom'),
+ '/\.php$/'
+ );
+ $words = [];
+
+ foreach ($iterator as $file) {
+ $classname = 'Hoa\Realdom\\' . substr($file->getFilename(), 0, -4);
+ $class = new \ReflectionClass($classname);
if ($class->isSubclassOf('\Hoa\Realdom')) {
$words[] = $classname::NAME;
}
-
- return;
- });
+ }
$readline = new Console\Readline();
$readline->setAutocompleter(