function run(&$filter_chain, &$request, &$response) { ob_start(); $filter_chain->next(); if($response->getContentType() == 'text/html' && $response->getStatus() == 200)//only 200? { if (Debug :: isConsoleEnabled()) $response->append(Debug :: parseHtmlConsole()); $response->append(MessageBox :: parse());//It definitely should be somewhere else! } $response->commit(); ob_end_flush(); }
protected function _doRun() { $this->_registerFileResolvers(); $this->_registerToolkit(); $this->_loadPackages(); $request = Limb :: toolkit()->getRequest(); $response = Limb :: toolkit()->getResponse(); $filter_chain = new FilterChain($request, $response); $this->_registerFilters($filter_chain); $filter_chain->process(); if( $response->getContentType() == 'text/html' && $response->getStatus() == 200)//only 200? { if (Debug :: isConsoleEnabled()) $response->write(Debug :: parseHtmlConsole()); $response->write(MessageBox :: parse());//It definitely should be somewhere else! } $response->commit(); }