Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$hydrationMode throughout can be a string as well as int (for custom modes) #7441

Merged
merged 1 commit into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions lib/Doctrine/ORM/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ abstract class AbstractQuery
/**
* The hydration mode.
*
* @var integer
* @var string|int
*/
protected $_hydrationMode = self::HYDRATE_OBJECT;

Expand Down Expand Up @@ -680,8 +680,8 @@ public function setFetchMode($class, $assocName, $fetchMode)
/**
* Defines the processing mode to be used during hydration / result set transformation.
*
* @param integer $hydrationMode Doctrine processing mode to be used during hydration process.
* One of the Query::HYDRATE_* constants.
* @param string|int $hydrationMode Doctrine processing mode to be used during hydration process.
* One of the Query::HYDRATE_* constants.
*
* @return static This query instance.
*/
Expand All @@ -695,7 +695,7 @@ public function setHydrationMode($hydrationMode)
/**
* Gets the hydration mode currently used by the query.
*
* @return integer
* @return string|int
*/
public function getHydrationMode()
{
Expand All @@ -707,7 +707,7 @@ public function getHydrationMode()
*
* Alias for execute(null, $hydrationMode = HYDRATE_OBJECT).
*
* @param int $hydrationMode
* @param string|int $hydrationMode
*
* @return mixed
*/
Expand Down Expand Up @@ -743,7 +743,7 @@ public function getScalarResult()
/**
* Get exactly one result or null.
*
* @param int $hydrationMode
* @param string|int $hydrationMode
*
* @return mixed
*
Expand Down Expand Up @@ -781,7 +781,7 @@ public function getOneOrNullResult($hydrationMode = null)
* If the result is not unique, a NonUniqueResultException is thrown.
* If there is no result, a NoResultException is thrown.
*
* @param integer $hydrationMode
* @param string|int $hydrationMode
*
* @return mixed
*
Expand Down Expand Up @@ -875,7 +875,7 @@ public function getHints()
* iterate over the result.
*
* @param ArrayCollection|array|null $parameters The query parameters.
* @param integer|null $hydrationMode The hydration mode to use.
* @param string|int|null $hydrationMode The hydration mode to use.
*
* @return \Doctrine\ORM\Internal\Hydration\IterableResult
*/
Expand All @@ -899,7 +899,7 @@ public function iterate($parameters = null, $hydrationMode = null)
* Executes the query.
*
* @param ArrayCollection|array|null $parameters Query parameters.
* @param integer|null $hydrationMode Processing mode to be used during the hydration process.
* @param string|int|null $hydrationMode Processing mode to be used during the hydration process.
*
* @return mixed
*/
Expand All @@ -916,7 +916,7 @@ public function execute($parameters = null, $hydrationMode = null)
* Execute query ignoring second level cache.
*
* @param ArrayCollection|array|null $parameters
* @param integer|null $hydrationMode
* @param string|int|null $hydrationMode
*
* @return mixed
*/
Expand Down Expand Up @@ -974,7 +974,7 @@ private function executeIgnoreQueryCache($parameters = null, $hydrationMode = nu
* Load from second level cache or executes the query and put into cache.
*
* @param ArrayCollection|array|null $parameters
* @param integer|null $hydrationMode
* @param string|int|null $hydrationMode
*
* @return mixed
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/EntityManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function getUnitOfWork();
*
* @deprecated
*
* @param int $hydrationMode
* @param string|int $hydrationMode
*
* @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
*/
Expand All @@ -258,7 +258,7 @@ public function getHydrator($hydrationMode);
/**
* Create a new instance for the given hydration mode.
*
* @param int $hydrationMode
* @param string|int $hydrationMode
*
* @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator
*
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public function getMaxResults()
* iterated over the result.
*
* @param ArrayCollection|array|null $parameters The query parameters.
* @param integer $hydrationMode The hydration mode to use.
* @param string|int $hydrationMode The hydration mode to use.
*
* @return \Doctrine\ORM\Internal\Hydration\IterableResult
*/
Expand Down