Revert "Injected propel.connection in the PropelDataCollector collector"

This reverts commit 284dfeb355.
This commit is contained in:
William DURAND 2011-04-13 18:07:53 +02:00
parent 00c97f3c17
commit 3ee928ea19
2 changed files with 2 additions and 10 deletions

View file

@ -31,12 +31,6 @@ class PropelDataCollector extends DataCollector
* @var \PropelConfiguration
*/
protected $propelConfiguration;
/**
* Propel connection
*
* @var \PropelPDO
*/
protected $propelConnection;
/**
* Constructor
@ -44,12 +38,11 @@ class PropelDataCollector extends DataCollector
* @param \Propel\PropelBundle\Logger\PropelLogger $logger A PropelLogger
* @param string $connectionName A connection name
*/
public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration, \PropelPDO $propelConnection)
public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration)
{
$this->logger = $logger;
$this->connectionName = $connectionName;
$this->propelConfiguration = $propelConfiguration;
$this->propelConnection = $propelConnection;
}
/**
@ -60,7 +53,7 @@ class PropelDataCollector extends DataCollector
{
$this->data = array(
'queries' => $this->buildQueries(),
'querycount' => $this->propelConnection->getQueryCount(),
'querycount' => \Propel::getConnection($this->connectionName)->getQueryCount(),
'connectionName' => $this->connectionName,
);
}

View file

@ -24,7 +24,6 @@
<argument type="service" id="propel.logger" />
<argument>%propel.dbal.default_connection%</argument>
<argument type="service" id="propel.configuration" />
<argument type="service" id="propel.connection" />
</service>
</services>
</container>