Commit 511bf224 authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Fixed and added some missing/wrong docblocks. Renamed Assigned to...

[2.0] Fixed and added some missing/wrong docblocks. Renamed Assigned to AssignedGenerator as scheduled to be renamed.
parent 517bb664
...@@ -33,6 +33,7 @@ use \ReflectionClass, ...@@ -33,6 +33,7 @@ use \ReflectionClass,
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision: 3938 $
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
......
...@@ -27,7 +27,8 @@ namespace Doctrine\Common\Cache; ...@@ -27,7 +27,8 @@ namespace Doctrine\Common\Cache;
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
......
...@@ -28,6 +28,7 @@ namespace Doctrine\Common\Cache; ...@@ -28,6 +28,7 @@ namespace Doctrine\Common\Cache;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision: 3938 $
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
......
...@@ -28,6 +28,7 @@ namespace Doctrine\Common\Cache; ...@@ -28,6 +28,7 @@ namespace Doctrine\Common\Cache;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision: 3938 $
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
......
...@@ -30,6 +30,7 @@ use \Memcache; ...@@ -30,6 +30,7 @@ use \Memcache;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision: 3938 $
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
......
...@@ -28,11 +28,11 @@ namespace Doctrine\Common\Cache; ...@@ -28,11 +28,11 @@ namespace Doctrine\Common\Cache;
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision: 3938 $
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
* @author David Abdemoulaie <dave@hobodave.com> * @author David Abdemoulaie <dave@hobodave.com>
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/ */
class XcacheCache extends AbstractCache class XcacheCache extends AbstractCache
{ {
......
...@@ -27,13 +27,15 @@ use Doctrine\DBAL\Types\Type, ...@@ -27,13 +27,15 @@ use Doctrine\DBAL\Types\Type,
/** /**
* Base contract for ORM queries. Base class for Query and NativeQuery. * Base contract for ORM queries. Base class for Query and NativeQuery.
* *
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com * @link www.doctrine-project.org
* @since 1.0 * @since 2.0
* @version $Revision: 1393 $ * @version $Revision$
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/ */
abstract class AbstractQuery abstract class AbstractQuery
{ {
......
...@@ -25,10 +25,13 @@ namespace Doctrine\ORM; ...@@ -25,10 +25,13 @@ namespace Doctrine\ORM;
* Configuration container for all configuration options of Doctrine. * Configuration container for all configuration options of Doctrine.
* It combines all configuration options from DBAL & ORM. * It combines all configuration options from DBAL & ORM.
* *
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0 * @since 2.0
* @internal When adding a new configuration option just write a getter/setter * @internal When adding a new configuration option just write a getter/setter
* pair and add the option to the _attributes array with a proper default value. * pair and add the option to the _attributes array with a proper default value.
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/ */
class Configuration extends \Doctrine\DBAL\Configuration class Configuration extends \Doctrine\DBAL\Configuration
{ {
......
...@@ -31,12 +31,13 @@ use Doctrine\Common\EventManager, ...@@ -31,12 +31,13 @@ use Doctrine\Common\EventManager,
* The EntityManager is the central access point to ORM functionality. * The EntityManager is the central access point to ORM functionality.
* *
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision$ * @version $Revision$
* @author Roman Borschel <roman@code-factory.org> * @author Benjamin Eberlei <kontakt@beberlei.de>
* @todo Remove flush modes. They dont seem to be of much use. Manual flushing should * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* be enough. * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/ */
class EntityManager class EntityManager
{ {
......
...@@ -29,10 +29,13 @@ namespace Doctrine\ORM; ...@@ -29,10 +29,13 @@ namespace Doctrine\ORM;
* write their own repositories with business-specific methods to locate entities. * write their own repositories with business-specific methods to locate entities.
* *
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @author Roman Borschel <roman@code-factory.org> * @version $Revision$
* @author Jonathan H. Wage <jonwage@gmail.com> * @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/ */
class EntityRepository class EntityRepository
{ {
......
...@@ -27,11 +27,16 @@ use Doctrine\ORM\ORMException; ...@@ -27,11 +27,16 @@ use Doctrine\ORM\ORMException;
/** /**
* Special generator for application-assigned identifiers (doesnt really generate anything). * Special generator for application-assigned identifiers (doesnt really generate anything).
* *
* @since 2.0 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @author Roman Borschel <roman@code-factory.org> * @link www.doctrine-project.org
* @todo Rename: AssignedGenerator? * @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/ */
class Assigned extends AbstractIdGenerator class AssignedGenerator extends AbstractIdGenerator
{ {
/** /**
* Returns the identifier assigned to the given entity. * Returns the identifier assigned to the given entity.
......
...@@ -7,8 +7,14 @@ use Doctrine\ORM\EntityManager; ...@@ -7,8 +7,14 @@ use Doctrine\ORM\EntityManager;
/** /**
* Id generator that uses a single-row database table and a hi/lo algorithm. * Id generator that uses a single-row database table and a hi/lo algorithm.
* *
* @since 2.0 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @todo Implementation * @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/ */
class TableGenerator extends AbstractIdGenerator class TableGenerator extends AbstractIdGenerator
{ {
......
...@@ -33,7 +33,8 @@ use Doctrine\ORM\ORMException, ...@@ -33,7 +33,8 @@ use Doctrine\ORM\ORMException,
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision: 3938 $ * @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
...@@ -388,7 +389,7 @@ class ClassMetadataFactory ...@@ -388,7 +389,7 @@ class ClassMetadataFactory
$class->setIdGenerator($sequenceGenerator); $class->setIdGenerator($sequenceGenerator);
break; break;
case ClassMetadata::GENERATOR_TYPE_NONE: case ClassMetadata::GENERATOR_TYPE_NONE:
$class->setIdGenerator(new \Doctrine\ORM\Id\Assigned()); $class->setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator());
break; break;
case ClassMetadata::GENERATOR_TYPE_TABLE: case ClassMetadata::GENERATOR_TYPE_TABLE:
throw new ORMException("TableGenerator not yet implemented."); throw new ORMException("TableGenerator not yet implemented.");
......
...@@ -37,6 +37,9 @@ use Doctrine\Common\Collections\ArrayCollection, ...@@ -37,6 +37,9 @@ use Doctrine\Common\Collections\ArrayCollection,
* @link www.doctrine-project.org * @link www.doctrine-project.org
* @since 2.0 * @since 2.0
* @version $Revision$ * @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
* @internal This class contains performance-critical code. * @internal This class contains performance-critical code.
*/ */
...@@ -585,7 +588,7 @@ class UnitOfWork implements PropertyChangedListener ...@@ -585,7 +588,7 @@ class UnitOfWork implements PropertyChangedListener
$idGen = $targetClass->idGenerator; $idGen = $targetClass->idGenerator;
if ( ! $idGen->isPostInsertGenerator()) { if ( ! $idGen->isPostInsertGenerator()) {
$idValue = $idGen->generate($this->_em, $entry); $idValue = $idGen->generate($this->_em, $entry);
if ( ! $idGen instanceof \Doctrine\ORM\Id\Assigned) { if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) {
$this->_entityIdentifiers[$oid] = array($targetClass->identifier[0] => $idValue); $this->_entityIdentifiers[$oid] = array($targetClass->identifier[0] => $idValue);
$targetClass->getSingleIdReflectionProperty()->setValue($entry, $idValue); $targetClass->getSingleIdReflectionProperty()->setValue($entry, $idValue);
} else { } else {
...@@ -1200,7 +1203,7 @@ class UnitOfWork implements PropertyChangedListener ...@@ -1200,7 +1203,7 @@ class UnitOfWork implements PropertyChangedListener
$idGen = $class->idGenerator; $idGen = $class->idGenerator;
if ( ! $idGen->isPostInsertGenerator()) { if ( ! $idGen->isPostInsertGenerator()) {
$idValue = $idGen->generate($this->_em, $entity); $idValue = $idGen->generate($this->_em, $entity);
if ( ! $idGen instanceof \Doctrine\ORM\Id\Assigned) { if ( ! $idGen instanceof \Doctrine\ORM\Id\AssignedGenerator) {
$this->_entityIdentifiers[$oid] = array($class->identifier[0] => $idValue); $this->_entityIdentifiers[$oid] = array($class->identifier[0] => $idValue);
$class->setIdentifierValues($entity, $idValue); $class->setIdentifierValues($entity, $idValue);
} else { } else {
......
...@@ -20,7 +20,7 @@ class AllTests ...@@ -20,7 +20,7 @@ class AllTests
$suite = new \Doctrine\Tests\DoctrineTestSuite('Doctrine Orm Id'); $suite = new \Doctrine\Tests\DoctrineTestSuite('Doctrine Orm Id');
$suite->addTestSuite('Doctrine\Tests\ORM\Id\SequenceGeneratorTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Id\SequenceGeneratorTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Id\AssignedIdTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Id\AssignedGeneratorTest');
return $suite; return $suite;
} }
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
namespace Doctrine\Tests\ORM\Id; namespace Doctrine\Tests\ORM\Id;
use Doctrine\ORM\Id\Assigned; use Doctrine\ORM\Id\AssignedGenerator;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
/** /**
* AssignedIdTest * AssignedGeneratorTest
* *
* @author robo * @author robo
*/ */
class AssignedIdTest extends \Doctrine\Tests\OrmTestCase class AssignedGeneratorTest extends \Doctrine\Tests\OrmTestCase
{ {
private $_em; private $_em;
private $_assignedGen; private $_assignedGen;
...@@ -19,7 +19,7 @@ class AssignedIdTest extends \Doctrine\Tests\OrmTestCase ...@@ -19,7 +19,7 @@ class AssignedIdTest extends \Doctrine\Tests\OrmTestCase
protected function setUp() protected function setUp()
{ {
$this->_em = $this->_getTestEntityManager(); $this->_em = $this->_getTestEntityManager();
$this->_assignedGen = new Assigned; $this->_assignedGen = new AssignedGenerator;
} }
public function testThrowsExceptionIfIdNotAssigned() public function testThrowsExceptionIfIdNotAssigned()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment