Download the PHP package xiidea/ez-maintenance without Composer

On this page you can find all versions of the php package xiidea/ez-maintenance. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ez-maintenance

Easy Maintenance

Utility Library to handle site maintenance situation

Key Features

Installation/Usage

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:

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

Then you can just call EzMaintenance\Worker::watch() In your index.php (see the example)

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

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

Env Adapters

Using this adapter you can watch over existence of an environment variable. The maintenance page will be shown if the environment variable is present with specific value.

Const Adapters

This is same ad the env adapter. Only difference is it will check for a php constant instead of environment variable.

Custom Adapters

You can define your own adapter by implementing the EzMaintenance\Adapter\AdapterInterface

Common options

Following options are available to customize the behaviour of the library

interval

This option state the interval in second, the system will check for the site status with this interval. default is 5 second.

override_key

You can configure a key to override the maintenance mode. This is helpful t test your site normally while others will see maintenance page. To browse the page in maintenance mode, you just need to pass the override key as query parameter like: http://yourdomain.com/?key={override_key}

inverse

If you want to enable maintenance mode when adapter return false, you can set inverse = true.

template

You can provide the built-in template name(simple, game, clock) or path to your own template file. All the options will also be available in your template. You should echo $javascript in your template file to enable auto status check.

msg

If you are using any of the default template, you can customize the message using this option.

Contributing to Library

If you find a bug or want to add a feature to EzMaintenance, great! In order to make it easier and quicker for me to verify and merge changes in, it would be amazing if you could follow these few basic steps:

  1. Fork the project.
  2. Branch out into a new branch. git checkout -b name_of_new_feature_or_bug
  3. Make your feature addition or bug fix.
  4. Commit.
  5. Send me a pull request!

All versions of ez-maintenance with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xiidea/ez-maintenance contains the following files

Loading the files please wait ...