auraphp/Aura.Filter

Configure RuleLocator readme section missing

Closed this issue · 2 comments

In the readme you have the the following:

(Note that if we instantiate manually, we will need to configure the RuleLocator manually to add rule services. See the "Advanced Usage" section near the end of this page for more information.)

This section doesn't seem to be present?

@chrissound This is what we need to link to https://github.com/auraphp/Aura.Filter#set-the-class-as-a-service .

Example

<?php
$locator = $filter->getRuleLocator();
$locator->set('hex', function () {
    return new Vendor\Package\Filter\Rule\Hex;
});

also see scripts/instance.php file.