PHP code example of jdolieslager / celeritas

1. Go to this page and download the library: Download jdolieslager/celeritas 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/ */

    

jdolieslager / celeritas example snippets


array(
  'celeritas_options' => array(
        'enabled'           => true,
        'cache_file'        => __DIR__ . '/../data/cache/classcache/' .
                               md5(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)) .
                               '.php',
        // Those namespaces / full classnames will not be cached
        'ignore_namespaces' => array(
            'Celeritas',
            'Composer',
            'composer',
        ),
        // Those request extensions will be ignored. (Example: /img/bg.png or /css/app.css)
        'ignore_extensions' => array(
            'css',
            'js',
            'gif',
            'png',
            'jpg',
            'ico',
        ),
    ),
);

$applicationConfig = onConfig['celeritas_options']['enabled'] &&
    is_file($applicationConfig['celeritas_options']['cache_file'])
) {
    

/** @var \Zend\Mvc\MvcEvent $mvcEvent */
$eventManager = $mvcEvent->getTarget()->getEventManager();

// No Cache
$eventManager->trigger('celeritas.no_cache', $this, array());