Fixed missed documentation issues in Doctrine\ORM
This commit is contained in:
parent
aadce3c747
commit
774bb3fec4
@ -27,6 +27,9 @@ namespace Doctrine\ORM;
|
|||||||
*/
|
*/
|
||||||
class EntityNotFoundException extends ORMException
|
class EntityNotFoundException extends ORMException
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct('Entity was not found.');
|
parent::__construct('Entity was not found.');
|
||||||
|
@ -30,9 +30,28 @@ use Doctrine\ORM\EntityManager;
|
|||||||
*/
|
*/
|
||||||
class SequenceGenerator extends AbstractIdGenerator implements Serializable
|
class SequenceGenerator extends AbstractIdGenerator implements Serializable
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The allocation size of the sequence.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_allocationSize;
|
private $_allocationSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the sequence.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $_sequenceName;
|
private $_sequenceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_nextValue = 0;
|
private $_nextValue = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int|null
|
||||||
|
*/
|
||||||
private $_maxValue = null;
|
private $_maxValue = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +72,7 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable
|
|||||||
* @param EntityManager $em
|
* @param EntityManager $em
|
||||||
* @param object $entity
|
* @param object $entity
|
||||||
*
|
*
|
||||||
* @return integer|float The generated value.
|
* @return integer The generated value.
|
||||||
*
|
*
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
@ -74,7 +93,7 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable
|
|||||||
/**
|
/**
|
||||||
* Gets the maximum value of the currently allocated bag of values.
|
* Gets the maximum value of the currently allocated bag of values.
|
||||||
*
|
*
|
||||||
* @return integer|float
|
* @return integer|null
|
||||||
*/
|
*/
|
||||||
public function getCurrentMaxValue()
|
public function getCurrentMaxValue()
|
||||||
{
|
{
|
||||||
@ -84,7 +103,7 @@ class SequenceGenerator extends AbstractIdGenerator implements Serializable
|
|||||||
/**
|
/**
|
||||||
* Gets the next value that will be returned by generate().
|
* Gets the next value that will be returned by generate().
|
||||||
*
|
*
|
||||||
* @return integer|float
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function getNextValue()
|
public function getNextValue()
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,14 @@ class TableGenerator extends AbstractIdGenerator
|
|||||||
*/
|
*/
|
||||||
private $_allocationSize;
|
private $_allocationSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int|null
|
||||||
|
*/
|
||||||
private $_nextValue;
|
private $_nextValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int|null
|
||||||
|
*/
|
||||||
private $_maxValue;
|
private $_maxValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -610,6 +610,8 @@ class ObjectHydrator extends AbstractHydrator
|
|||||||
* When executed in a hydrate() loop we may have to clear internal state to
|
* When executed in a hydrate() loop we may have to clear internal state to
|
||||||
* decrease memory consumption.
|
* decrease memory consumption.
|
||||||
*
|
*
|
||||||
|
* @param mixed $eventArgs
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function onClear($eventArgs)
|
public function onClear($eventArgs)
|
||||||
|
@ -27,6 +27,9 @@ namespace Doctrine\ORM;
|
|||||||
*/
|
*/
|
||||||
class NoResultException extends UnexpectedResultException
|
class NoResultException extends UnexpectedResultException
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct('No result was found for query although at least one row was expected.');
|
parent::__construct('No result was found for query although at least one row was expected.');
|
||||||
|
@ -705,7 +705,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
/* ArrayAccess implementation */
|
/* ArrayAccess implementation */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see containsKey()
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function offsetExists($offset)
|
public function offsetExists($offset)
|
||||||
{
|
{
|
||||||
@ -713,7 +713,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see get()
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function offsetGet($offset)
|
public function offsetGet($offset)
|
||||||
{
|
{
|
||||||
@ -721,8 +721,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see add()
|
* {@inheritdoc}
|
||||||
* @see set()
|
|
||||||
*/
|
*/
|
||||||
public function offsetSet($offset, $value)
|
public function offsetSet($offset, $value)
|
||||||
{
|
{
|
||||||
@ -734,20 +733,23 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see remove()
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function offsetUnset($offset)
|
public function offsetUnset($offset)
|
||||||
{
|
{
|
||||||
return $this->remove($offset);
|
return $this->remove($offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
return $this->coll->key();
|
return $this->coll->key();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the element of the collection at the current iterator position.
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
@ -755,7 +757,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the internal iterator position to the next element.
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function next()
|
public function next()
|
||||||
{
|
{
|
||||||
@ -773,7 +775,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a slice of $length elements starting at position $offset from the Collection.
|
* Extracts a slice of $length elements starting at position $offset from the Collection.
|
||||||
*
|
*
|
||||||
* If $length is null it returns all elements from $offset to the end of the Collection.
|
* If $length is null it returns all elements from $offset to the end of the Collection.
|
||||||
* Keys have to be preserved by this method. Calling this method will only return the
|
* Keys have to be preserved by this method. Calling this method will only return the
|
||||||
@ -798,7 +800,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleanup internal state of cloned persistent collection.
|
* Cleans up internal state of cloned persistent collection.
|
||||||
*
|
*
|
||||||
* The following problems have to be prevented:
|
* The following problems have to be prevented:
|
||||||
* 1. Added entities are added to old PC
|
* 1. Added entities are added to old PC
|
||||||
@ -825,7 +827,7 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select all elements from a selectable that match the expression and
|
* Selects all elements from a selectable that match the expression and
|
||||||
* return a new collection containing these elements.
|
* return a new collection containing these elements.
|
||||||
*
|
*
|
||||||
* @param \Doctrine\Common\Collections\Criteria $criteria
|
* @param \Doctrine\Common\Collections\Criteria $criteria
|
||||||
@ -866,4 +868,3 @@ final class PersistentCollection implements Collection, Selectable
|
|||||||
return new ArrayCollection(array_merge($persister->loadCriteria($criteria), $newObjects));
|
return new ArrayCollection(array_merge($persister->loadCriteria($criteria), $newObjects));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,6 +299,9 @@ public function __construct()
|
|||||||
}
|
}
|
||||||
';
|
';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
|
if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
|
||||||
@ -439,6 +442,8 @@ public function __construct()
|
|||||||
/**
|
/**
|
||||||
* Sets the name of the class the generated classes should extend from.
|
* Sets the name of the class the generated classes should extend from.
|
||||||
*
|
*
|
||||||
|
* @param string $classToExtend
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setClassToExtend($classToExtend)
|
public function setClassToExtend($classToExtend)
|
||||||
|
Loading…
Reference in New Issue
Block a user