1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/lib/Doctrine/Id/SequenceIdentityGenerator.php

25 lines
487 B
PHP
Raw Normal View History

2008-09-07 17:48:40 +04:00
<?php
class Doctrine_Id_SequenceIdentityGenerator extends Doctrine_Id_IdentityGenerator
{
private $_sequenceName;
public function __construct($sequenceName)
{
$this->_sequenceName = $sequenceName;
}
/**
* Enter description here...
*
* @param Doctrine_Connection $conn
* @override
*/
public function getPostInsertId()
{
return $this->_em->getConnection()->lastInsertId($this->_sequenceName);
}
}
?>