我正在尝试为DBAL连接创建自定义包装器,并且已经正确设置了config.yml文件。
然而,我得到了以下错误:
DBALException: The given 'wrapperClass' Some\Bundle\Doctrine\DBAL\ExtendedConnection
has to be a subtype of \Doctrine\DBAL\Connection.但是,我的类扩展了\Doctrine\DBAL\Connection
namespace Some\Bundle\Doctrine\DBAL\ExtendedConnection;
use Doctrine\DBAL\Connection AS Connection;
class ExtendedConnection extends Connection
{
public function multipleResultSetsFetchAll()
{
$stmt = $this->getConnection();
do{
$results[] = $stmt->fetchAll();
}while($stmt->nextRowset());
return $results;
}
}有什么想法吗?
发布于 2013-06-05 20:30:12
我设法找到了这里的问题--它是文件名。我的文件名是Conection.php,但是把它改成ExtendedConnection.php就行了。
https://stackoverflow.com/questions/16938089
复制相似问题