Constantine
This package contains constants and enumerations for various packages that are missing useful constants., (*1)
Usage
<?php
use Constantine\Aws\S3\CommandOptions;
$client->putObject([
CommandOptions::KEY => 'key to use',
CommandOptions::BUCKET => 'A bucket name',
]);
Why?
Because magic strings are awful. Constants prevent typos and are subject to auto-completion in most IDEs., (*2)
Contributing
Please see src/Constanstine/Aws/S3/CommandOptions.php for an example of the formatting. This code base uses PSR-2 style., (*3)
For ease of use, the same namespace as the original package is used where applicable, prefixed with Constantine\. For your class names, use suffixes like Options, Keys, etc (always plural)., (*4)