26 const PROTOCOL_URI =
'http://meta.wildfirehq.org/Protocol/JsonStream/0.2';
31 const STRUCTURE_URI =
'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1';
36 const PLUGIN_URI =
'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3';
65 $header = sprintf(
'%s-%s', self::HEADER_PREFIX, join(
'-', $meta));
82 array(1, 1, 1, self::$messageIndex++),
120 if (!headers_sent() && self::$sendHeaders) {
134 if (!self::$sendHeaders) {
139 if (!self::$initialized) {
140 self::$initialized =
true;
143 if (!self::$sendHeaders) {
153 if (trim(current(
$header)) !==
'') {
165 if (!empty(
$_SERVER[
'HTTP_USER_AGENT']) && preg_match(
'{\bFirePHP/\d+\.\d+\b}',
$_SERVER[
'HTTP_USER_AGENT'])) {
169 return isset(
$_SERVER[
'HTTP_X_FIREPHP_VERSION']);
177 if (
'sendHeaders' !== $property) {
178 throw new \InvalidArgumentException(
'Undefined property '.$property);
181 return static::$sendHeaders;
187 public function __set($property, $value)
189 if (
'sendHeaders' !== $property) {
190 throw new \InvalidArgumentException(
'Undefined property '.$property);
193 static::$sendHeaders = $value;
createHeader(array $meta, $message)
Base header creation function used by init headers & record headers.
const STRUCTURE_URI
FirePHP structure for parsing messages & their presentation.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol.
static $initialized
Whether or not Wildfire vendor-specific headers have been generated & sent yet.
const HEADER_PREFIX
Header prefix for Wildfire to recognize & parse headers.
Base Handler class providing the Handler structure.
const PLUGIN_URI
Must reference a "known" plugin, otherwise headers won't display in FirePHP.
__get($property)
BC getter for the sendHeaders property that has been made static.
const PROTOCOL_URI
WildFire JSON header message format.
write(array $record)
Creates & sends header for a record, ensuring init headers have been sent prior.
headersAccepted()
Verifies if the headers are accepted by the current user agent.
catch(Exception $e) $message
Add a drawing to the header
__set($property, $value)
BC setter for the sendHeaders property that has been made static.
createRecordHeader(array $record)
Creates message header from record.
Create styles array
The data for the language used.
sendHeader($header, $content)
Send header string to the client.
getInitHeaders()
Wildfire initialization headers to enable message parsing.