PHP code example of creemedia / cakebrake4

1. Go to this page and download the library: Download creemedia/cakebrake4 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

creemedia / cakebrake4 example snippets


	Configure::load('airbrake_options', 'default');

	$isCli = php_sapi_name() === 'cli';
	if ($isCli) {
		(new ConsoleErrorHandler(Configure::read('Error')))->register();
	} else {
		if (!Configure::read('debug')) {
			(new \Creemedia\CakeBrake4\Error\AirbrakeHandler(Configure::read('Error')))->register();
		} else {
			(new ErrorHandler(Configure::read('Error')))->register();
		}
	}