/** * Выполняет обработку запроса * * @param WS_Environment $env * * @return mixed */ public function run(WS_Environment $env) { $handler = Log_FirePHP::Handler(); $handler->where('level', '>=', $this->log_level); Log::logger()->handler($handler); $response = $this->application->run($env); $handler->dump($response); return $response; }
/** * Tests Log_FirePHP in Zend_Log compatibility mode */ public function testZendCompatible() { $this->Log_FirePHP->zendCompatible = true; $this->Log_FirePHP->info('This is a test'); $this->Log_FirePHP->warn('Yet another "test"'); $this->assertEquals(json_encode(array('Type', 'Message')), Q\HTTP::header_getValue("X-FirePHP-Data-{$this->unique_base}00000001")); $this->assertEquals(json_encode(array('info', 'This is a test')), Q\HTTP::header_getValue("X-FirePHP-Data-{$this->unique_base}00000002")); $this->assertEquals(json_encode(array('warn', 'Yet another "test"')), Q\HTTP::header_getValue("X-FirePHP-Data-{$this->unique_base}00000003")); }
/** * Enter description here... * * @param string $title * @param array $columns Column headers */ public function __construct($title, $columns = null) { $this->title = $title; if (isset($columns)) { $this->columns = $columns; } $this->unique_base = 4000 + ++self::$counter; if ($this->unique_base >= 5000) { throw new Exception("Unable to create another FirePHPTable log: 1000 is really the limit."); } parent::__construct(); }