Created
July 30, 2012 12:48
-
-
Save adamlundrigan/3206678 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbParams = array( | |
'database' => 'changeme', | |
'username' => 'changeme', | |
'password' => 'changeme', | |
'hostname' => 'changeme', | |
); | |
/** | |
* No need to edit below this line | |
*/ | |
return array( | |
'service_manager' => array( | |
'factories' => array( | |
'Zend\Db\Adapter\Adapter' => function ($sm) use ($dbParams) { | |
$adapter = new Zend\Db\Adapter\Adapter(array( | |
'driver' => 'pdo', | |
'dsn' => 'mysql:dbname='.$dbParams['database'].';host='.$dbParams['hostname'], | |
'database' => $dbParams['database'], | |
'username' => $dbParams['username'], | |
'password' => $dbParams['password'], | |
'hostname' => $dbParams['hostname'], | |
)); | |
$adapter->getDriver()->registerResultPrototype( | |
new Zend\Db\Adapter\Driver\Pdo\ScrollableResult | |
); | |
return $adapter; | |
}, | |
), | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/zf2 for the canonical source repository | |
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
* @package Zend_Db | |
*/ | |
namespace Zend\Db\Adapter\Driver\Pdo; | |
/** | |
* @category Zend | |
* @package Zend_Db | |
* @subpackage Adapter | |
*/ | |
class ScrollableResult extends Result | |
{ | |
/** | |
* | |
* @var string | |
*/ | |
protected $statementMode = self::STATEMENT_MODE_SCROLLABLE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment