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.
Via Composer
$ composer require pachico/tier
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"
]
}
*/
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.