TDoG-Skin/vendor/blessing/rejection
2024-08-17 19:13:54 +08:00
..
.github/workflows 首次提交 2024-08-17 19:13:54 +08:00
src/Blessing 首次提交 2024-08-17 19:13:54 +08:00
tests 首次提交 2024-08-17 19:13:54 +08:00
.editorconfig 首次提交 2024-08-17 19:13:54 +08:00
.gitignore 首次提交 2024-08-17 19:13:54 +08:00
.php_cs.dist 首次提交 2024-08-17 19:13:54 +08:00
composer.json 首次提交 2024-08-17 19:13:54 +08:00
LICENSE 首次提交 2024-08-17 19:13:54 +08:00
phpunit.xml 首次提交 2024-08-17 19:13:54 +08:00
README.md 首次提交 2024-08-17 19:13:54 +08:00

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