stmswitcher/excuseme

Error message generator based on prgrammers' excuses.

0.1 2016-07-10 15:50 UTC

This package is auto-updated.

Last update: 2024-11-14 05:34:32 UTC


README

Error message generator based on programmers' excuses.

#Installation via composer:

composer require "stmswitcher/excuseme:0.1" --dev

#Usage

use stmswitcher\excuseme\ExcuseMe;

$excuseme = new ExcuseMe();

echo $excuseme->forCode($exception->getCode());

or

use stmswitcher\excuseme\ExcuseMe;

echo ExcuseMe::getMessage($locale, $code);

#Localization To use localized messages, you only have to specify your language like this:

$excuseme = new ExcuseMe('ru');

or

echo ExcuseMe::getMessage('ru', $code);

Only Russian and English localizations is provided right now. Feel free to contribute excuses for your language! :)