2013-06-05 2 views
1

나는 DBAL 연결에 대한 사용자 정의 랩퍼를 작성하려고하고 올바르게 설정 config.yml 파일을 가지고 Symfony2 교리 DBAL 래퍼 문제

그러나 나는 다음과 같은 오류가 점점 오전 : 그러나

DBALException: The given 'wrapperClass' Some\Bundle\Doctrine\DBAL\ExtendedConnection 
has to be a subtype of \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; 
    } 
} 

어떤 아이디어 : 내 클래스는 \Doctrine\DBAL\Connection을 확장하고?

답변

1

여기에서 문제를 발견 할 수있었습니다. 파일 이름이었습니다. 내 파일 이름은 Conection.php이지만 ExtendedConnection.php로 변경하면 효과적입니다.