original_string: public function AvailableApplications() {
        if (!is_array($this->_AvailableApplications)) {
           $ApplicationInfo = array();
           
           $AppFolders = Gdn_FileSystem::Folders(PATH_APPLICATIONS); // Get an array of all application folders
           $ApplicationAboutFiles = Gdn_FileSystem::FindAll(PATH_APPLICATIONS, 'settings' . DS . 'about.php', $AppFolders); // Now look for about files within them.
           // Include them all right here and fill the application info array
           $ApplicationCount = count($ApplicationAboutFiles);
           for ($i = 0; $i < $ApplicationCount; ++$i) {
              include($ApplicationAboutFiles[$i]);
  
              // Define the folder name for the newly added item
              foreach ($ApplicationInfo as $ApplicationName => $Info) {
                 if (array_key_exists('Folder', $ApplicationInfo[$ApplicationName]) === FALSE) {
                    $Folder = substr($ApplicationAboutFiles[$i], strlen(PATH_APPLICATIONS));
                    if (substr($Folder, 0, 1) == DS)
                       $Folder = substr($Folder, 1);
  
                    $Folder = substr($Folder, 0, strpos($Folder, DS));
                    $ApplicationInfo[$ApplicationName]['Folder'] = $Folder;
                 }
              }
           }
           // Add all of the indexes to the applications.
           foreach ($ApplicationInfo as $Index => &$Info) {
              $Info['Index'] = $Index;
           }
  
           $this->_AvailableApplications = $ApplicationInfo;
        }
  
        return $this->_AvailableApplications;
     }
code: public function AvailableApplications() {
        if (!is_array($this->_AvailableApplications)) {
           $ApplicationInfo = array();
           
           $AppFolders = Gdn_FileSystem::Folders(PATH_APPLICATIONS); // Get an array of all application folders
           $ApplicationAboutFiles = Gdn_FileSystem::FindAll(PATH_APPLICATIONS, 'settings' . DS . 'about.php', $AppFolders); // Now look for about files within them.
           // Include them all right here and fill the application info array
           $ApplicationCount = count($ApplicationAboutFiles);
           for ($i = 0; $i < $ApplicationCount; ++$i) {
              include($ApplicationAboutFiles[$i]);
  
              // Define the folder name for the newly added item
              foreach ($ApplicationInfo as $ApplicationName => $Info) {
                 if (array_key_exists('Folder', $ApplicationInfo[$ApplicationName]) === FALSE) {
                    $Folder = substr($ApplicationAboutFiles[$i], strlen(PATH_APPLICATIONS));
                    if (substr($Folder, 0, 1) == DS)
                       $Folder = substr($Folder, 1);
  
                    $Folder = substr($Folder, 0, strpos($Folder, DS));
                    $ApplicationInfo[$ApplicationName]['Folder'] = $Folder;
                 }
              }
           }
           // Add all of the indexes to the applications.
           foreach ($ApplicationInfo as $Index => &$Info) {
              $Info['Index'] = $Index;
           }
  
           $this->_AvailableApplications = $ApplicationInfo;
        }
  
        return $this->_AvailableApplications;
     }
code_tokens: public function AvailableApplications ( ) { if ( ! is_array ( $ this -> _AvailableApplications ) ) { $ ApplicationInfo = array ( ) ; $ AppFolders = Gdn_FileSystem :: Folders ( PATH_APPLICATIONS ) ; // Get an array of all application folders $ ApplicationAboutFiles = Gdn_FileSystem :: FindAll ( PATH_APPLICATIONS , 'settings' . DS . 'about.php' , $ AppFolders ) ; // Now look for about files within them. // Include them all right here and fill the application info array $ ApplicationCount = count ( $ ApplicationAboutFiles ) ; for ( $ i = 0 ; $ i < $ ApplicationCount ; ++ $ i ) { include ( $ ApplicationAboutFiles [ $ i ] ) ; // Define the folder name for the newly added item foreach ( $ ApplicationInfo as $ ApplicationName => $ Info ) { if ( array_key_exists ( 'Folder' , $ ApplicationInfo [ $ ApplicationName ] ) === FALSE ) { $ Folder = substr ( $ ApplicationAboutFiles [ $ i ] , strlen ( PATH_APPLICATIONS ) ) ; if ( substr ( $ Folder , 0 , 1 ) == DS ) $ Folder = substr ( $ Folder , 1 ) ; $ Folder = substr ( $ Folder , 0 , strpos ( $ Folder , DS ) ) ; $ ApplicationInfo [ $ ApplicationName ] [ 'Folder' ] = $ Folder ; } } } // Add all of the indexes to the applications. foreach ( $ ApplicationInfo as $ Index => & $ Info ) { $ Info [ 'Index' ] = $ Index ; } $ this -> _AvailableApplications = $ ApplicationInfo ; } return $ this -> _AvailableApplications ; }
docstring: Looks through the root Garden directory for valid applications and
  returns them as an associative array of "Application Name" =>
  "Application Info Array". It also adds a "Folder" definition to the
  Application Info Array for each application.
docstring_tokens: Looks through the root Garden directory for valid applications and returns them as an associative array of Application Name = > Application Info Array . It also adds a Folder definition to the Application Info Array for each application .