/**
  * Loads the search type objects.
  */
 public static function loadSearchTypeObjects()
 {
     if (self::$searchTypeObjects !== null) {
         return;
     }
     // get cache
     WCF::getCache()->addResource('searchableMessageTypes-' . PACKAGE_ID, WCF_DIR . 'cache/cache.searchableMessageTypes-' . PACKAGE_ID . '.php', WCF_DIR . 'lib/system/cache/CacheBuilderSearchableMessageType.class.php');
     self::$searchTypeData = WCF::getCache()->get('searchableMessageTypes-' . PACKAGE_ID);
     // get objects
     self::$searchTypeObjects = array();
     foreach (self::$searchTypeData as $type) {
         // calculate class path
         $path = '';
         if (empty($type['packageDir'])) {
             $path = WCF_DIR;
         } else {
             $path = FileUtil::getRealPath(WCF_DIR . $type['packageDir']);
         }
         // include class file
         if (!file_exists($path . $type['classPath'])) {
             throw new SystemException("unable to find class file '" . $path . $type['classPath'] . "'", 11000);
         }
         require_once $path . $type['classPath'];
         // create instance
         $className = StringUtil::getClassName($type['classPath']);
         if (!class_exists($className)) {
             throw new SystemException("unable to find class '" . $className . "'", 11001);
         }
         self::$searchTypeObjects[$type['typeName']] = new $className();
     }
 }