PHP code example of gourmet / filters

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

    

gourmet / filters example snippets


\Cake\Core\Plugin::load('Gourmet/Filters');

DispatcherFactory::add('Gourmet/Filters.Maintenance');

DispatcherFactory::add('Gourmet/Filters.Maintenance', [
    'path' => '/absolute/path/to/maintenance/file.html'
]);

DispatcherFactory::add('Gourmet/Filters.Ip', [
    'allow' => [
        '127.0.0.1'
    ]
]);

DispatcherFactory::add('Gourmet/Filters.Ip', [
    'disallow' => [
        '127.0.0.1'
    ]
]);

DispatcherFactory::add('Gourmet/Filters.Robots');