Ejemplo n.º 1
0
 public static function deleteFromDoctrineAndLucene($object, $culture = null, Doctrine_Connection $conn = null)
 {
     $conn = $conn ? $conn : $object->getTable()->getConnection();
     $conn->beginTransaction();
     try {
         $ret = $object->doctrineDelete($conn);
         aZendSearch::deleteFromLuceneIndex($object, $culture);
         $conn->commit();
         return $ret;
     } catch (Exception $e) {
         $conn->rollBack();
         throw $e;
     }
 }