Snowair\Debugbar\PhalconDebugbar::debugbarRequestCollector PHP Method

debugbarRequestCollector() public method

    public function debugbarRequestCollector()
    {
        // 如果 collector 需要额外的js合并, 需要在此添加一次, 以保证debugbar.widget.js不报js错误
        if ($this->shouldCollect('doctrine', false)) {
            $debugStack = new \Doctrine\DBAL\Logging\DebugStack();
            $entityManager = $this->di['entityManager'];
            $entityManager->getConnection()->getConfiguration()->setSQLLogger($debugStack);
            $this->addCollector(new DoctrineCollector($debugStack));
        }
        if ($this->shouldCollect('db')) {
            $queryCollector = new QueryCollector(new Profiler());
            $this->addCollector($queryCollector);
        }
        if ($this->shouldCollect('view')) {
            $viewCollector = new ViewCollector(null, null);
            $this->addCollector($viewCollector);
        }
    }