예제 #1
0
파일: Import.php 프로젝트: kotow/work
 public function delete($con = null)
 {
     try {
         $con = Propel::getConnection();
         $con->begin();
         //deletes generic document
         $genericDocument = Document::getGenericDocument($this);
         $genericDocument->delete();
         parent::delete();
         $con->commit();
         Document::deleteObjCache($this);
         return true;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
예제 #2
0
 /**
  * Set's the target for the import (table or model name).
  *
  * @param $targetName
  *
  * @return mixed
  */
 public function setTargetName($targetName)
 {
     parent::setTargetName($targetName);
     $this->setTable($targetName);
 }
예제 #3
0
파일: BaseImport.php 프로젝트: kotow/work
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ImportPeer();
     }
     return self::$peer;
 }