Feature Request
| Q |
A |
| New Feature |
yes |
| RFC |
no |
| BC Break |
no |
Summary
Adding the #[Attribute] tag to filters would allow several new use cases for the library.
For example, object validation (i.e., a DTO):
use Laminas\Filter;
final class CreateNewBookDto extends Dto
{
#[Filter\StringTrim]
public $author;
#[Filter\StringTrim]
#[Filter\StringToUpper]
public $title;
public function __construct($author, $title)
{
$this->author = $author;
$this->title = $title;
}
}
In this case, filters could be read using reflection to create an automated pipeline to filter object properties.
Other cases could include route filtering of HTTP requests, console input filtering, etc.
Feature Request
Summary
Adding the
#[Attribute]tag to filters would allow several new use cases for the library.For example, object validation (i.e., a DTO):
In this case, filters could be read using reflection to create an automated pipeline to filter object properties.
Other cases could include route filtering of HTTP requests, console input filtering, etc.