Permalink
Browse files

Add an "all modules" test bootstrap

  • Loading branch information...
1 parent 686013c commit 4c98fc13315f4aa0cc8bb816d9639fb0bda6b6a3 @kiall kiall committed Jul 2, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 bootstrap_all_modules.php
View
@@ -0,0 +1,20 @@
+<?php
+
+include_once('bootstrap.php');
+
+// Enable all modules we can find
+$modules_iterator = new DirectoryIterator(MODPATH);
+
+$modules = array();
+
+foreach ($modules_iterator as $module)
+{
+ if ($module->isDir())
+ {
+ $modules[$module->getFilename()] = MODPATH.$module->getFilename();
+ }
+}
+
+Kohana::modules(Kohana::modules() + $modules);
+
+unset ($modules_iterator, $modules, $module);

0 comments on commit 4c98fc1

Please sign in to comment.