supermarchello / bitrix-result-modifier
该库允许使result_modifier.php文件中的代码更加简洁,通过提供修改器类的接口并将修改器应用于结果数组来实现
v2.0.0
2023-06-08 12:30 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-08 15:11:26 UTC
README
该库允许使result_modifier.php文件中的代码更加简洁,通过提供修改器类的接口并将修改器应用于结果数组来实现
安装
使用 composer 将bitrix-result-modifier安装到您的项目中
composer require supermarchello/bitrix-result-modifier
使用方法
开发者必须实现ModifierInterface接口,可以通过addModifier方法添加多个修改器
使用示例
<?php use Supermarchello\BitrixResultModifier\Modifier; use Supermarchello\BitrixResultModifier\TestModifier; Modifier::create() ->addModifier(new TestModifier()) ->applyModifications($arResult);