Commit 0b9c990d authored by romanb's avatar romanb

[2.0] Intermediate checkin.

parent a4216926
...@@ -64,7 +64,7 @@ abstract class AbstractQuery ...@@ -64,7 +64,7 @@ abstract class AbstractQuery
/** /**
* @var array $_enumParams Array containing the keys of the parameters that should be enumerated. * @var array $_enumParams Array containing the keys of the parameters that should be enumerated.
*/ */
protected $_enumParams = array(); //protected $_enumParams = array();
/** /**
* The user-specified ResultSetMapping to use. * The user-specified ResultSetMapping to use.
...@@ -141,20 +141,20 @@ abstract class AbstractQuery ...@@ -141,20 +141,20 @@ abstract class AbstractQuery
* *
* @param array $enumParams Enum parameters. * @param array $enumParams Enum parameters.
*/ */
protected function _setEnumParams($enumParams = array()) /*protected function _setEnumParams($enumParams = array())
{ {
$this->_enumParams = $enumParams; $this->_enumParams = $enumParams;
} }*/
/** /**
* Get all enumerated parameters * Get all enumerated parameters
* *
* @return array All enumerated parameters * @return array All enumerated parameters
*/ */
public function getEnumParams() /*public function getEnumParams()
{ {
return $this->_enumParams; return $this->_enumParams;
} }*/
/** /**
* Convert ENUM parameters to their integer equivalents * Convert ENUM parameters to their integer equivalents
...@@ -162,7 +162,7 @@ abstract class AbstractQuery ...@@ -162,7 +162,7 @@ abstract class AbstractQuery
* @param $params Parameters to be converted * @param $params Parameters to be converted
* @return array Converted parameters array * @return array Converted parameters array
*/ */
public function convertEnums($params) /*public function convertEnums($params)
{ {
foreach ($this->_enumParams as $key => $values) { foreach ($this->_enumParams as $key => $values) {
if (isset($params[$key]) && ! empty($values)) { if (isset($params[$key]) && ! empty($values)) {
...@@ -171,7 +171,7 @@ abstract class AbstractQuery ...@@ -171,7 +171,7 @@ abstract class AbstractQuery
} }
return $params; return $params;
} }*/
/** /**
* Get all defined parameters * Get all defined parameters
...@@ -507,11 +507,7 @@ abstract class AbstractQuery ...@@ -507,11 +507,7 @@ abstract class AbstractQuery
*/ */
protected function _prepareParams(array $params) protected function _prepareParams(array $params)
{ {
// Convert boolean params return $this->_em->getConnection()->getDatabasePlatform()->convertBooleans($params);
$params = $this->_em->getConnection()->getDatabasePlatform()->convertBooleans($params);
// Convert enum params
return $this->convertEnums($params);
} }
/** /**
......
...@@ -27,6 +27,7 @@ namespace Doctrine\ORM\Query; ...@@ -27,6 +27,7 @@ namespace Doctrine\ORM\Query;
* *
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Janne Vanhala <jpvanhal@cc.hut.fi> * @author Janne Vanhala <jpvanhal@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://www.doctrine-project.org * @link http://www.doctrine-project.org
* @since 2.0 * @since 2.0
...@@ -34,9 +35,13 @@ namespace Doctrine\ORM\Query; ...@@ -34,9 +35,13 @@ namespace Doctrine\ORM\Query;
*/ */
class ParserResult class ParserResult
{ {
protected $_sqlExecutor; private $_sqlExecutor;
protected $_resultSetMapping; private $_resultSetMapping;
/**
* Initializes a new instance of the <tt>ParserResult</tt> class.
* The new instance is initialized with an empty <tt>ResultSetMapping</tt>.
*/
public function __construct() public function __construct()
{ {
$this->_resultSetMapping = new ResultSetMapping; $this->_resultSetMapping = new ResultSetMapping;
...@@ -64,7 +69,9 @@ class ParserResult ...@@ -64,7 +69,9 @@ class ParserResult
} }
/** /**
* @nodoc * Sets the SQL executor that should be used for this ParserResult.
*
* @param AbstractExecutor $executor
*/ */
public function setSqlExecutor(\Doctrine\ORM\Query\Exec\AbstractExecutor $executor) public function setSqlExecutor(\Doctrine\ORM\Query\Exec\AbstractExecutor $executor)
{ {
...@@ -72,7 +79,9 @@ class ParserResult ...@@ -72,7 +79,9 @@ class ParserResult
} }
/** /**
* @nodoc * Gets the SQL executor used by this ParserResult.
*
* @return AbstractExecutor
*/ */
public function getSqlExecutor() public function getSqlExecutor()
{ {
......
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