Download the PHP package juliangut/zf-maintenance without Composer

On this page you can find all versions of the php package juliangut/zf-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 zf-maintenance

Latest Version License

Build status Code Quality Code Coverage Total Downloads

Juliangut Zend Framework Maintenance Module

Maintenance module for Zend Framework 2.

Installation

  1. Best way to install is using Composer:

or download it directly from github and place it in your application's module/ directory.

  1. Add Jgut\Zf\Maintenance module to the module section of your config/application.config.php

  2. Copy config\zf-maintenance.global.php.dist to your config directory and rename it zf-maintenance.global.php

  3. Install zend-developer-tools (optional)

Configuration

Configuration example can be found in config\zf-maintenance.global.php.dist

Strategy

Custom strategy to handle maintenance mode.

To create your own just extend Jgut\Zf\Maintenance\View\MaintenanceStrategy

Template

Template file for maintenance strategy

Block

By default maintenance mode prevents application from continuing execution by throwing Zend\Mvc\MvcEvent::EVENT_DISPATCH_ERROR handled by Jgut\Zf\Maintenance\View\MaintenanceStrategy

If you don't want maintenance mode to stop execution and show maintenance page then set block to false.

This can be used in case you are performing maintenance tasks that don't need the application to be shut down, like ddbb backup, ...

In this case it is usefull to use maintenanceMessage view helper to show maintenance information

Providers

Maintenance mode providers serve different means to activate maintenance mode

Providers are checked in the order they appear in providers array, when one provider is active the rest of providers are not checked

Common attributes

All maintenance providers have a message attribute used in maintenance strategy page

ConfigProvider

Manual provider, set maintenance mode just by setting active attribute

EnvironmentProvider

Environment variable check provider, checks an environment variable to set maintenance mode

FileProvider

File provider, verifies the existance of a file to set maintenance mode

Scheduled Providers

Any provider implementing Jgut\Zf\Maintenance\Provider\ScheduledProviderInterface will be used to determine future maintenance situations and used on scheduledMaintenance view helper as well as in zend-developer-tools

ConfigScheduledProvider

Manually scheduled maintenance time frame

Maintenance mode will be set on during the time span provided by start and end attributes (DateTime valid string or object).

If only start provided maintenance mode won't stop once started. If only end provided maintenance mode will be on from this moment and until end time

CrontabProvider

Scheduled maintenance based on CRON expression syntax

Maintenance mode will be set on during the time span provided by CRON expression and interval attribute (valid DateInterval specification string).

Uses Michael Dowling (mtdowling) cron-expression

Exclusions

Conditions to bypass maintenance mode

Exclusions are checked the same way as providers are, in the order they are located in exclusions array, when one exclusion is active (isExcluded) the rest of exclusions are not checked

IpExclusion

Excludes IPs from maintenance mode

RuteExclusion

Excludes routes from maintenance mode

View helpers

MaintenanceMessage

maintenanceMessage will return the message of current active maintenance provider or empty string if not in maintenance mode

Allows you to show maintenance message when maintenance is in non blocking state or for those users for who exclusions apply

This helper would normally be used on a general template as application header or footer as an informative area. Mind that if in maintenance blocking mode all requests not bound by exclusions will be redirected to maintenance page

ScheduledMaintenance

scheduledMaintenance will return an array with the next scheduled maintenance time period

ZendDeveloperTools integration

A collector jgut-zf-maintenance-collector is present for ZendDeveloperTools showing current maintenance status and future scheduled maintenance period times

Contributing

Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before

See file CONTRIBUTING.md

License

Release under BSD-3-Clause License.

See file LICENSE included with the source code for a copy of the license terms


All versions of zf-maintenance with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
zendframework/zendframework Version ~2.3
mtdowling/cron-expression Version ~1.0
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 juliangut/zf-maintenance contains the following files

Loading the files please wait ....