tatsh / constantine
Missing constants and enumerations for PHP.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/tatsh/constantine
This package is not auto-updated.
Last update: 2020-01-24 17:21:44 UTC
README
This package contains constants and enumerations for various packages that are missing useful constants.
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.
Contributing
Please see src/Constanstine/Aws/S3/CommandOptions.php
for an example of the formatting. This code base uses PSR-2 style.
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).