requireConfig("app_path"); // get application specific pathes if ($appl == "DEFAULT") $propel_path = Config::getInstance()->requireConfig("PropelClassPath"); else $propel_path = Config::getInstance()->requireConfig("$appl::PropelClassPath"); $this->application = $appl; // init propel // @TODO: Ein mehrfaches Propel::init überschreibt offene TAs //if ($path) $conf_path = "$path/$propel_path/conf/propel-conf.php"; //else $conf_path = "$propel_path/conf/propel-conf.php"; Propel::init("$path/$propel_path/conf/propel-conf.php"); // Add the generated 'classes' directory to the include path set_include_path("$path/$propel_path/classes" . PATH_SEPARATOR . get_include_path()); // An explicit connection name is only necessary for appliocations // dealing with mutiple connections. An empty connection name // uses the default connection. $this->connection_name = Config::getInstance()->getConfig("$appl::ConnectionName"); } // instance stuff private $connection_name; function getConnectionName() { return $this->connection_name; } function getApplication() { return $this->application; } function getConnection() { return Propel::getConnection($this->connection_name); } function startTA(){ $this->getConnection()->beginTransaction(); } function commitTA(){ $this->getConnection()->commit(); } function rollbackTA(){ $this->getConnection()->rollBack(); } } //Transaction::$ta_arr = array();