PHPackages                             xiidea/ez-maintenance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xiidea/ez-maintenance

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xiidea/ez-maintenance
=====================

A handy library to handle site maintenance situation

1.0.0(11y ago)21463MITPHPPHP &gt;=5.3

Since Mar 24Pushed 8y ago3 watchersCompare

[ Source](https://github.com/xiidea/ez-maintenance)[ Packagist](https://packagist.org/packages/xiidea/ez-maintenance)[ Docs](http://xiidea.github.io/ez-maintenance/)[ RSS](/packages/xiidea-ez-maintenance/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Easy Maintenance
================

[](#easy-maintenance)

Utility Library to handle site maintenance situation

Key Features
------------

[](#key-features)

- Easy to use
- Highly Customizable

Installation/Usage
------------------

[](#installationusage)

If you're using Composer to manage dependencies, you can include the following in your composer.json file:

```
"require": {
    "xiidea/ez-maintenance": "dev-master"
}

```

Then, after running `composer update` or `php composer.phar update`, you can load the class using Composer's autoloading:

```
require 'vendor/autoload.php';
```

Otherwise, you can simply require the given `autoload.php` file:

```
require_once 'PATH_TO_LIBRARY/autoload.php';
```

Then you can just call `EzMaintenance\Worker::watch()` In your `index.php` (see the [example](https://github.com/xiidea/ez-maintenance/blob/master/example/index.php))

Different Adapters to check maintenance mode
--------------------------------------------

[](#different-adapters-to-check-maintenance-mode)

Use adapter to detect if we need to serve the maintenance page or not. 3 Types of adapter provided. You can also define your own adapter.

##### File Adapters

[](#file-adapters)

This is the default adapter. it checks for a specific file if exist or not. default path is *down*. For the following implementation you will be shown maintenance page if there is a file exists named `maintenance.enable`

```
