Example #1
0
 /**
  * Browse all component extension and make selected operation.
  *
  * @param int $type use constant AINSTALLER_INSTALL or AINSTALLER_UNINSTALL
  * @return array
  */
 function browsePackages($type, $root)
 {
     foreach (JFolder::folders($root, '.', false, true) as $package) {
         switch ($type) {
             case AINSTALLER_INSTALL:
                 $outcome[] =& AInstaller::installPackage($package);
                 break;
             case AINSTALLER_UNINSTALL:
                 $outcome[] =& AInstaller::uninstallPackage($package);
                 break;
         }
     }
     return isset($outcome) ? $outcome : array();
 }