PHP code example of castiron / typo3-plugin-rollbar

1. Go to this page and download the library: Download castiron/typo3-plugin-rollbar 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/ */

    

castiron / typo3-plugin-rollbar example snippets

$php
/**
 * Rollbar config
 */
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rollbar'] = array(
    'rollbar_enabled' => true, // You can use this to turn it off/on
    'rollbar_config' => array(
        'access_token' => '[my-server-side-access-token]',
        'environment' => 'my-environment-name', // This is arbitrary and will scope your reporting in Rollbar
    ),
    /**
     * These are defaults
     */
//    'set_exception_handler' => false,
//    'set_error_handler' => false,
//    'report_fatal_errors' => true,
);

/**
 * Initialize Error Handling. Do this after the rollbar config. The error handling must get
 * instantiated early on, which is why we don't use helper methods from ExtensionManagementUtility, etc.
 */