forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PHLAK:hotfix/gravatar-trim-strtolower into develop
Pull request zendframework#4976
- Loading branch information
Showing
3 changed files
with
106 additions
and
19 deletions.
There are no files selected for viewing
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
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
27 changes: 27 additions & 0 deletions
27
library/Zend/Db/TableGateway/Feature/StatementOptionsFeature.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Zend\Db\Table\Feature; | ||
|
||
use Zend\Db\Adapter\Driver\StatementInterface; | ||
|
||
class StatementOptionsFeature extends AbstractFeature | ||
{ | ||
|
||
public function preSelectExecute(StatementInterface $statement) | ||
{ | ||
$adapter = $this->tableGateway->getAdapter(); | ||
$platform = $adapter->getPlatform(); | ||
$platformName = $platform->getName(); | ||
|
||
switch ($platformName) { | ||
case "SQLServer": | ||
//Necessary for ResultSet count to work | ||
$statement->setScrollable(\SQLSRV_CURSOR_STATIC); | ||
break; | ||
} | ||
} | ||
|
||
// public function preInsertExecute(StatementInterface $statement){} | ||
// public function preUpdateExecute(StatementInterface $statement){} | ||
// public function preDeleteExecute(StatementInterface $statement){} | ||
} |