Doctrine_Adapter_Statement methods signature
We have to figure out why do not follow the methods signature of Doctrine_Adapter_Statement the methods signature of Doctrine_Connection_Statement and PDOStatement.
// Doctrine_Adapter_Statement
public function bindValue($no, $value);
public function fetch();
public function execute();
public function setFetchMode($mode);
// Doctrine_Adapter_Statement_Interface
public function bindValue($param, $value, $type = null);
public function execute($params = null);
public function fetch(
$fetchStyle = Doctrine_Core::FETCH_BOTH,
$cursorOrientation = Doctrine_Core::FETCH_ORI_NEXT,
$cursorOffset = null
);
public function setFetchMode($mode, $arg1 = null, $arg2 = null);
Doctrine_Connection_StatementimplementsDoctrine_Adapter_Statement_Interface- There is no
Doctrine_Adapter_Statementused anywhere Doctrine_Adapter_Statement_Interfaceused byDoctrine_Adapter_Statement_Oracle,Doctrine_Adapter_Statement_MockandDoctrine_Connection_Statement
Doctrine_Adapter_Statement it is more generic with fewer features than Doctrine_Adapter_Statement_Interface
On the doctrine1 source code, we can find 5 occurrences.
As lying type hints.
lib/Doctrine/Connection/Mssql.php:293:29: * @return PDOStatement|Doctrine_Adapter_Statement lib/Doctrine/Connection/Mssql.php:309:29: * @return PDOStatement|Doctrine_Adapter_Statement lib/Doctrine/Connection/Statement.php:42:83: * @var mixed $_stmt PDOStatement object, boolean false or Doctrine_Adapter_Statement object lib/Doctrine/Connection.php:994:29: * @return PDOStatement|Doctrine_Adapter_Statement lib/Doctrine/Connection.php:1006:29: * @return PDOStatement|Doctrine_Adapter_Statement
bindValue implementations
setFetchMode implmentations
fetch implementations:
No one implements the signature of Doctrine_Adapter_Statement methods. The Doctrine_Adapter_Statement feels more like an interface than an abstract class.