replace() public méthode

The REPLACE type of query does not make part of the SQL standards. Since practically only MySQL and SQLIte implement it natively, this type of query isemulated through this method for other DBMS using standard types of queries inside a transaction to assure the atomicity of the operation.
public replace ( Doctrine_Connection $conn = null ) : integer
$conn Doctrine_Connection optional connection parameter
Résultat integer number of rows affected
 /**
  * Insert or update record in the database.
  *
  * @param object  $conn (optional)
  */
 public function replace(Doctrine_Connection $conn = null)
 {
     // unless explicitly passed, we find the _master connection
     // for the current env.
     if ($conn === null) {
         $conn = AIR2_DBManager::get_master_connection();
     }
     parent::replace($conn);
 }