Skip to content

Commit

Permalink
Merge pull request laminas#39 from froschdesign/hotfix/docs/black-whi…
Browse files Browse the repository at this point in the history
…te-list

Adds call-outs for new and deprecated features of version 2.12.0
  • Loading branch information
Ocramius committed Nov 29, 2021
2 parents f2e7522 + 820bb4c commit e3e9191
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/book/standard-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ laminas-filter comes with a standard set of filters, available for immediate use

## AllowList

TIP: **New Feature**
Available since version 2.12.0

Previously known as `Whitelist`.
This filter will return `null` if the value being filtered is not present the
filter's allowed list of values. If the value is present, it will return that
Expand Down Expand Up @@ -150,6 +153,12 @@ print $filter->filter('/vol/tmp/filename.txt');

This will return '`filename.txt`'.

## Blacklist

CAUTION: **Deprecated**
This filter is deprecated since version 2.12.0.
Use the [DenyList filter](#denylist) instead.

## Boolean

This filter changes a given input to be a `BOOLEAN` value. This is often useful when working with
Expand Down Expand Up @@ -716,6 +725,9 @@ which accepts an array of all options.

## DenyList

TIP: **New Feature**
Available since version 2.12.0

Previously known as `Blacklist`.
This filter will return `null` if the value being filtered is present in the filter's list of
values. If the value is not present, it will return that value.
Expand Down Expand Up @@ -1908,3 +1920,9 @@ echo $filter->filter('www.example.com');
```

The above results in the string `https://www.example.com`.

## Whitelist

CAUTION: **Deprecated**
This filter is deprecated since version 2.12.0.
Use the [AllowList filter](#allowlist) instead.

0 comments on commit e3e9191

Please sign in to comment.