tatsh/constantine

This package is abandoned and no longer maintained. No replacement package was suggested.

Missing constants and enumerations for PHP.

dev-master 2017-12-19 08:04 UTC

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).