mirror of
https://github.com/zoe-may/TDoG-Skin.git
synced 2024-11-24 05:42:19 +08:00
.. | ||
.github/workflows | ||
src/Blessing | ||
tests | ||
.editorconfig | ||
.gitignore | ||
.php_cs.dist | ||
composer.json | ||
LICENSE | ||
phpunit.xml | ||
README.md |
rejection
Rejection is an object that indicates you are rejecting.
We used this in Blessing Skin Server for plugins.
💿 Install
Run Composer:
composer require blessing/rejection
🔨 Usage
Create a rejection
use Blessing\Rejection;
$rejection = new Rejection('reason');
You can pass optional second argument to constructor:
$rejection = new Rejection('reason', ['name' => '']);
Retrieve reason
$rejection->getReason();
Retrieve data:
$rejection->getData();
If your data is an array, you pass a key:
$rejection = new Rejection('reason', ['name' => '']);
$rejection->getData('name');
📄 License
MIT License (c) The Blessing Skin Team