Example #1
0
 function findInstalledCliApps()
 {
     $discovered = new Util\ArrayObject();
     $apps = Project::getCurrent()->getApplications();
     foreach ($apps as $A) {
         foreach ($A->getCliModules() as $mod) {
             // TODO: Error if there is already a mod under this name
             $section = $discovered->setDefault($A->getName(), new Util\ArrayObject());
             $section[$A->getLabel() . ':' . $mod->getName()] = $mod;
         }
     }
     return $discovered;
 }