2008-09-07 13:48:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Special generator for application-assigned identifiers (doesnt really generate anything).
|
|
|
|
*
|
|
|
|
* @since 2.0
|
|
|
|
*/
|
2008-09-12 10:02:06 +00:00
|
|
|
class Doctrine_ORM_Id_Assigned extends Doctrine_ORM_Id_AbstractIdGenerator
|
2008-09-07 13:48:40 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Enter description here...
|
|
|
|
*
|
2008-09-12 10:40:23 +00:00
|
|
|
* @param Doctrine_ORM_Entity $entity
|
2008-09-07 13:48:40 +00:00
|
|
|
* @return unknown
|
|
|
|
* @override
|
|
|
|
*/
|
2008-09-12 10:40:23 +00:00
|
|
|
public function generate(Doctrine_ORM_Entity $entity)
|
2008-09-07 13:48:40 +00:00
|
|
|
{
|
|
|
|
if ( ! $entity->_identifier()) {
|
|
|
|
throw Doctrine_IdException::missingAssignedId($entity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|