hrodic/tier

Helper class for application tiers definitions

1.0.0 2017-06-24 20:17 UTC

This package is auto-updated.

Last update: 2024-04-23 06:03:29 UTC


README

Travis Scrutinizer Code Quality codecov

Tier is a simple class with no dependencies that handles the definition of application tiers. This is to avoid the usage of non standard strings that usually define the tier an application is running in.

This becomes handly when dealing with frameworks and the required tier configuration files.

Install

Via Composer

$ composer require pachico/tier

Usage

use Pachico\Tier\Tier;
$tier = new Tier(Tier::DEVELOPMENT, [
    Tier::DEVELOPMENT,
    Tier::STAGING,
    Tier::PRODUCTION
    ]
);
echo $tier . PHP_EOL; // development
echo json_encode($tier, JSON_PRETTY_PRINT) . PHP_EOL;
/**
{
    "tier": "development",
    "applicationTiers": [
        "development",
        "staging",
        "production"
    ]
}
*/

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.