original_string: private function getAnnotationsForSite()
      {
          $result = array();
          foreach ($this->idSites as $id) {
              $optionName = self::getAnnotationCollectionOptionName($id);
              $serialized = Option::get($optionName);
  
              if ($serialized !== false) {
                  $result[$id] = Common::safe_unserialize($serialized);
                  if (empty($result[$id])) {
                      // in case unserialize failed
                      $result[$id] = array();
                  }
              } else {
                  $result[$id] = array();
              }
          }
          return $result;
      }
code: private function getAnnotationsForSite()
      {
          $result = array();
          foreach ($this->idSites as $id) {
              $optionName = self::getAnnotationCollectionOptionName($id);
              $serialized = Option::get($optionName);
  
              if ($serialized !== false) {
                  $result[$id] = Common::safe_unserialize($serialized);
                  if (empty($result[$id])) {
                      // in case unserialize failed
                      $result[$id] = array();
                  }
              } else {
                  $result[$id] = array();
              }
          }
          return $result;
      }
code_tokens: private function getAnnotationsForSite ( ) { $ result = array ( ) ; foreach ( $ this -> idSites as $ id ) { $ optionName = self :: getAnnotationCollectionOptionName ( $ id ) ; $ serialized = Option :: get ( $ optionName ) ; if ( $ serialized !== false ) { $ result [ $ id ] = Common :: safe_unserialize ( $ serialized ) ; if ( empty ( $ result [ $ id ] ) ) { // in case unserialize failed $ result [ $ id ] = array ( ) ; } } else { $ result [ $ id ] = array ( ) ; } } return $ result ; }
docstring: Retrieves annotations from the database for the sites supplied to the
  constructor.
  
  @return array Lists of annotations mapped by site ID.
docstring_tokens: Retrieves annotations from the database for the sites supplied to the constructor .