/** * @return Profiler */ public function profilerFinish() { $aReturn = parent::profilerFinish(); $oProfile = end($this->profiles); $aInfo = $oProfile->toArray(); $aDebugInfo = array("type" => __FUNCTION__, "connection_dsn" => $this->aConnectionParameters['dsn'], "time" => $aInfo['elapsed'], "sql" => $aInfo['sql'], "datas" => is_object($aInfo['parameters']) ? $aInfo['parameters']->getNamedArray() : $aInfo['parameters']); \YcheukfDebug\Model\Debug::dump($aDebugInfo, "[inline]---[db]---" . __CLASS__); return $aReturn; }
public function profilerFinish() { parent::profilerFinish(); /** @var Query $lastQuery */ $lastQuery = end($this->profiles); $this->getLogger()->log($this->getPriority(), 'Query finished', array_intersect_key($lastQuery->toArray(), array_flip($this->getParametersFinish()))); $maxProfiles = $this->getMaxProfiles(); if ($maxProfiles > -1) { if (count($this->profiles) > $maxProfiles) { $this->profiles = array(); } } }