Esempio n. 1
0
 /**
  * 预载入propel 及 相关的类
  */
 public static function preLoadPropelClasses()
 {
     //单系统路径模式
     //self::loadFile( "PropelException.php", Pft_Config::getLibPath()."propel", true );
     //多系统路径模式
     $pathfilename = Pft_Config::getAbsPathFilename("PATH_LIB", "propel/PropelException.php");
     self::loadFile($pathfilename, null, true);
     //单系统路径模式
     //self::loadFile( "Propel.php", Pft_Config::getLibPath()."propel", true );
     //多系统路径模式
     $pathfilename = Pft_Config::getAbsPathFilename("PATH_LIB", "propel/Propel.php");
     self::loadFile($pathfilename, null, true);
     Propel::init(Pft_Config::getPropelConfFilename());
     //单系统路径模式
     //self::loadFile( "Criteria.php", Pft_Config::getLibPath()."propel/util", true );
     //多系统路径模式
     $pathfilename = Pft_Config::getAbsPathFilename("PATH_LIB", "propel/util/Criteria.php");
     self::loadFile($pathfilename, null, true);
     /**
      * 在 XxxxPeer 中自动 load Propel时,
      * 在此处 throw 的 exception 不能在 index 中捕获,
      * 怀疑在 Propel 的 某些Class 中 catch 了异常,然后没有再抛出
      */
     //throw new Exception("in preLoadPropelClasses");
 }