original_string: public function get_folder_name($folderid) {
          if (empty($folderid)) {
              throw new coding_exception('Empty folderid passed to get_folder_name');
          }
  
          // Cache based on oauthtoken and folderid.
          $cachekey = $this->folder_cache_key($folderid);
  
          if ($foldername = $this->foldernamecache->get($cachekey)) {
              return $foldername;
          }
  
          $url = self::API."/{$folderid}";
          $ret = json_decode($this->get($url));
          if (isset($ret->error)) {
              $this->log_out();
              return false;
          }
  
          $this->foldernamecache->set($cachekey, $ret->name);
          return $ret->name;
      }
code: public function get_folder_name($folderid) {
          if (empty($folderid)) {
              throw new coding_exception('Empty folderid passed to get_folder_name');
          }
  
          // Cache based on oauthtoken and folderid.
          $cachekey = $this->folder_cache_key($folderid);
  
          if ($foldername = $this->foldernamecache->get($cachekey)) {
              return $foldername;
          }
  
          $url = self::API."/{$folderid}";
          $ret = json_decode($this->get($url));
          if (isset($ret->error)) {
              $this->log_out();
              return false;
          }
  
          $this->foldernamecache->set($cachekey, $ret->name);
          return $ret->name;
      }
code_tokens: public function get_folder_name ( $ folderid ) { if ( empty ( $ folderid ) ) { throw new coding_exception ( 'Empty folderid passed to get_folder_name' ) ; } // Cache based on oauthtoken and folderid. $ cachekey = $ this -> folder_cache_key ( $ folderid ) ; if ( $ foldername = $ this -> foldernamecache -> get ( $ cachekey ) ) { return $ foldername ; } $ url = self :: API . "/{$folderid}" ; $ ret = json_decode ( $ this -> get ( $ url ) ) ; if ( isset ( $ ret -> error ) ) { $ this -> log_out ( ) ; return false ; } $ this -> foldernamecache -> set ( $ cachekey , $ ret -> name ) ; return $ ret -> name ; }
docstring: Returns a folder name property for a given folderid.
  
  @param string $folderid the folder id which is passed
  @return mixed folder name or false in case of error
docstring_tokens: Returns a folder name property for a given folderid .