Skip to content

heavenshell/php-silex-maintenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silex Maintenance extension.

This extension is for the Silex microframework enables to show maintenance html.

    <?php
    require_once 'silex.phar';
    require_once dirname(__DIR__) . '/src/MaintenanceExtension.php';

    $app = new Silex\Application();
    $app->register(new \MaintenanceExtension(), array(
        'maintenance.lock' => __DIR__ . '/maintenance',
        'maintenance.file' => __DIR__ . '/maintenance.html',
    ));

    $app->get('/', function () use ($app) {
        return json_encode(array('status' => true ));
    });


If you want to show maintenance.html, you just put file to 'maintenance.lock'.
    $ touch maintenance
MaintenanceExtension automatically find maintenance html file and response to client.

About

Show maintenance to client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages