original_string: public function getNames()
      {
          $cacheId   = 'SearchEngine.getSearchEngineNames';
          $cache     = Cache::getTransientCache();
          $nameToUrl = $cache->fetch($cacheId);
  
          if (empty($nameToUrl)) {
              $searchEngines = $this->getDefinitions();
  
              $nameToUrl = array();
              foreach ($searchEngines as $url => $info) {
                  if (!isset($nameToUrl[$info['name']])) {
                      $nameToUrl[$info['name']] = $url;
                  }
              }
              $cache->save($cacheId, $nameToUrl);
          }
  
          return $nameToUrl;
      }
code: public function getNames()
      {
          $cacheId   = 'SearchEngine.getSearchEngineNames';
          $cache     = Cache::getTransientCache();
          $nameToUrl = $cache->fetch($cacheId);
  
          if (empty($nameToUrl)) {
              $searchEngines = $this->getDefinitions();
  
              $nameToUrl = array();
              foreach ($searchEngines as $url => $info) {
                  if (!isset($nameToUrl[$info['name']])) {
                      $nameToUrl[$info['name']] = $url;
                  }
              }
              $cache->save($cacheId, $nameToUrl);
          }
  
          return $nameToUrl;
      }
code_tokens: public function getNames ( ) { $ cacheId = 'SearchEngine.getSearchEngineNames' ; $ cache = Cache :: getTransientCache ( ) ; $ nameToUrl = $ cache -> fetch ( $ cacheId ) ; if ( empty ( $ nameToUrl ) ) { $ searchEngines = $ this -> getDefinitions ( ) ; $ nameToUrl = array ( ) ; foreach ( $ searchEngines as $ url => $ info ) { if ( ! isset ( $ nameToUrl [ $ info [ 'name' ] ] ) ) { $ nameToUrl [ $ info [ 'name' ] ] = $ url ; } } $ cache -> save ( $ cacheId , $ nameToUrl ) ; } return $ nameToUrl ; }
docstring: Returns list of search engines by name
  
  @return array  Array of ( searchEngineName => URL )
docstring_tokens: Returns list of search engines by name