php-debugbar
php-debugbar copied to clipboard
PDO data collecting through AJAX in Yii 1.1
Hi,
i implement the debugbar in Yii, and i extend the Yii CDbConnection Class:
`
use DebugBar\DataCollector\PDO\TraceablePDO;
class DBarDbConnection extends CDbConnection { protected function createPdoInstance() { $instance = parent::createPdoInstance();
if(!Yii::app() instanceof CConsoleApplication)
{
$debugbar = DBar::getInstance();
if ($debugbar)
{
$debugbar->pdo = new TraceablePDO($instance);
$debugbar->saveInstance($debugbar);
}
}
return $instance;
}
} `
This works, but not for AJAX Calls, has anybody an idea?
Cheers Ralf