private function init() { if (sfContext::getInstance()->has('profiler')) { $timer = sfTimerManager::getTimer('afRead'); // this time will be stopeed inside XmlParser constructor } $parser = new XmlParser(); $this->type = $parser->getType(); $this->layout = $parser->getLayout(); if (method_exists($this->layout, 'beforeEnd')) { $this->layout->beforeEnd(); } if (sfContext::getInstance()->has('profiler')) { $timer = sfTimerManager::getTimer('afRender'); $timer->addTime(); // this one closes afRender timer that was started inside XmlParser constructor } }