Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol.

CloneableInstantiable
ExtendsMonolog\Handler\Handler
Monolog\Handler\AbstractHandler
Monolog\Handler\AbstractProcessingHandler
ImplementsMonolog\Handler\FormattableHandlerInterface
Monolog\Handler\HandlerInterface
Monolog\Handler\ProcessableHandlerInterface
Monolog\ResettableInterface
Methods
public Monolog\Handler\AbstractHandler::__construct( $level = 100, bool $bubble = true)
 
    public Monolog\Handler\Handler::__destruct()
    public Monolog\Handler\Handler::__sleep()
    public Monolog\Handler\Handler::close() : void
     

    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::getBubble() : bool
     

    Gets the bubbling behavior.

    • return bool true means that this handler allows bubbling. false means that bubbling is not permitted.
    public Monolog\Handler\AbstractProcessingHandler::getFormatter() : Monolog\Formatter\FormatterInterface
     

    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::getLevel() : int
     

    Gets minimum logging level at which this handler will be triggered.

    • return int
    public Monolog\Handler\AbstractProcessingHandler::handle(array $record) : bool
     

    {@inheritdoc}

    public Monolog\Handler\Handler::handleBatch(array $records) : void
     

    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::isHandling(array $record) : bool
     

    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::popProcessor() : callable
     

    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::pushProcessor(callable $callback) : Monolog\Handler\HandlerInterface
     

    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractProcessingHandler::reset()
    public Monolog\Handler\AbstractHandler::setBubble(bool $bubble) : self
     

    Sets the bubbling behavior.

    • return self
    public Monolog\Handler\AbstractProcessingHandler::setFormatter(Monolog\Formatter\FormatterInterface $formatter) : Monolog\Handler\HandlerInterface
     

    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractHandler::setLevel( $level) : self
     

    Sets minimum logging level at which this handler will be triggered.

    • return self
    Constants
    protected Monolog\Handler\FirePHPHandler::HEADER_PREFIX = 'X-Wf'
     

    Header prefix for Wildfire to recognize & parse headers

    protected Monolog\Handler\FirePHPHandler::PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'
     

    Must reference a "known" plugin, otherwise headers won't display in FirePHP

    protected Monolog\Handler\FirePHPHandler::PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'
     

    WildFire JSON header message format

    protected Monolog\Handler\FirePHPHandler::STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'
     

    FirePHP structure for parsing messages & their presentation

    Properties
    protected Monolog\Handler\AbstractHandler::$bubble
    protected Monolog\Handler\AbstractProcessingHandler::$formatter
     
    • var FormatterInterface
    protected static $initialized
     

    Whether or not Wildfire vendor-specific headers have been generated & sent yet

    protected Monolog\Handler\AbstractHandler::$level
    protected static $messageIndex = 1
     

    Shared static message index between potentially multiple handlers

    • var int
    protected Monolog\Handler\AbstractProcessingHandler::$processors
     
    • var callable[]
    protected static $sendHeaders = true
    Methods
    protected createHeader(array $meta, string $message) : array
     

    Base header creation function used by init headers & record headers

    • return array Complete header string ready for the client as key and message as value
    protected createRecordHeader(array $record) : array
     

    Creates message header from record

    • see \createHeader()
    protected getDefaultFormatter() : Monolog\Formatter\FormatterInterface
     

    {@inheritDoc}

    protected getInitHeaders() : array
     

    Wildfire initialization headers to enable message parsing

    • see \createHeader()
    • see \sendHeader()
    protected headersAccepted() : bool
     

    Verifies if the headers are accepted by the current user agent

    protected isWebRequest() : bool
     

    Checks if PHP's serving a web request

    • return bool
    protected Monolog\Handler\AbstractProcessingHandler::processRecord(array $record) : array
     

    Processes a record.

    protected Monolog\Handler\AbstractProcessingHandler::resetProcessors() : void
    protected sendHeader(string $header, string $content) : void
     

    Send header string to the client

    protected write(array $record) : void
     

    Creates & sends header for a record, ensuring init headers have been sent prior

    • see \sendHeader()
    • see \sendInitHeaders()
    Properties
    protected static $initialized
     

    Whether or not Wildfire vendor-specific headers have been generated & sent yet

    protected static $messageIndex = 1
     

    Shared static message index between potentially multiple handlers

    • var int
    protected static $sendHeaders = true
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only