src/Airbrake/EventHandler.php
public static function start($apiKey, $notifyOnWarning = false, array $options = array())
    {
        if (!isset(self::$instance)) {
            $config = new Configuration($apiKey, $options);

            $client = new Client($config);
            self::$instance = new self($client, $notifyOnWarning);

            if (null !== $config->get('errorReportingLevel')) {
                self::$instance->addErrorFilter(new ErrorReporting($config));
            }

            self::$instance->addExceptionFilter(new AirbrakeExceptionFilter());

            set_error_handler(array(self::$instance, 'onError'));
            set_exception_handler(array(self::$instance, 'onException'));
            register_shutdown_function(array(self::$instance, 'onShutdown'));
        }

        return self::$instance;
    }
public static function start($apiKey, $notifyOnWarning = false, array $options = array())
    {
        if (!isset(self::$instance)) {
            $config = new Configuration($apiKey, $options);

            $client = new Client($config);
            self::$instance = new self($client, $notifyOnWarning);

            if (null !== $config->get('errorReportingLevel')) {
                self::$instance->addErrorFilter(new ErrorReporting($config));
            }

            self::$instance->addExceptionFilter(new AirbrakeExceptionFilter());

            set_error_handler(array(self::$instance, 'onError'));
            set_exception_handler(array(self::$instance, 'onException'));
            register_shutdown_function(array(self::$instance, 'onShutdown'));
        }

        return self::$instance;
    }
Get the current handler.

@param string $apiKey
@param bool $notifyOnWarning
@param array $options
@return EventHandler