/**
  * Returns a FolderClass for a FolderID which is known to the mobile
  *
  * @param string    $folderid
  *
  * @access public
  * @return int
  * @throws NoHierarchyCacheAvailableException, NotImplementedException
  */
 public function GetFolderClassFromCacheByID($folderid)
 {
     //TODO check if the parent folder exists and is also beeing synchronized
     $typeFromCache = $this->device->GetFolderType($folderid);
     if ($typeFromCache === false) {
         throw new NoHierarchyCacheAvailableException(sprintf("Folderid '%s' is not fully synchronized on the device", $folderid));
     }
     $class = ZPush::GetFolderClassFromFolderType($typeFromCache);
     if ($class === false) {
         throw new NotImplementedException(sprintf("Folderid '%s' is saved to be of type '%d' but this type is not implemented", $folderid, $typeFromCache));
     }
     return $class;
 }