import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* @subpackage PHPUnit
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $
|
||||
* @version $Id: DbStatement.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
require_once "Zend/Db/Statement/Interface.php";
|
||||
@ -48,9 +48,14 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface
|
||||
*/
|
||||
protected $_rowCount = 0;
|
||||
|
||||
/**
|
||||
* @var Zend_Db_Profiler_Query
|
||||
*/
|
||||
protected $_queryProfile = null;
|
||||
|
||||
/**
|
||||
* Create a Select statement which returns the given array of rows.
|
||||
*
|
||||
*
|
||||
* @param array $rows
|
||||
* @return Zend_Test_DbStatement
|
||||
*/
|
||||
@ -65,7 +70,7 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface
|
||||
|
||||
/**
|
||||
* Create an Insert Statement
|
||||
*
|
||||
*
|
||||
* @param int $affectedRows
|
||||
* @return Zend_Test_DbStatement
|
||||
*/
|
||||
@ -109,6 +114,14 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Zend_Db_Profiler_Query $qp
|
||||
*/
|
||||
public function setQueryProfile(Zend_Db_Profiler_Query $qp)
|
||||
{
|
||||
$this->_queryProfile = $qp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $rowCount
|
||||
*/
|
||||
@ -156,6 +169,9 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface
|
||||
*/
|
||||
public function bindParam($parameter, &$variable, $type = null, $length = null, $options = null)
|
||||
{
|
||||
if($this->_queryProfile !== null) {
|
||||
$this->_queryProfile->bindParam($parameter, $variable);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -229,6 +245,10 @@ class Zend_Test_DbStatement implements Zend_Db_Statement_Interface
|
||||
*/
|
||||
public function execute(array $params = array())
|
||||
{
|
||||
if($this->_queryProfile !== null) {
|
||||
$this->_queryProfile->bindParams($params);
|
||||
$this->_queryProfile->end();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user