示例#1
0
文件: OTS.php 项目: Tobbebror/POT
 /**
  * Loads items list.
  * 
  * <p>
  * This method loads items list from <var>items.xml</var> and <var>items.otb</var> files from given directory. You can create local instances of items lists directly - calling this method will associate loaded list with POT class instance and will make it available everywhere in the code.
  * </p>
  * 
  * <p>
  * Note: Since 0.2.0+SVN this method is static.
  * </p>
  * 
  * @version 0.2.0+SVN
  * @since 0.1.0
  * @param string $path Items information directory.
  * @throws E_OTS_FileLoaderError On binary file loading error.
  */
 public static function loadItems($path)
 {
     self::$items = new OTS_ItemsList();
     // sets items cache if any
     if (isset(self::$itemsCache)) {
         self::$items->setCacheDriver(self::$itemsCache);
     }
     self::$items->loadItems($path);
 }