Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zend Filter Laravel Package

zendframework/zend-filter

Filtering and normalization utilities for PHP from Zend Framework. Provides a range of filters to sanitize, convert, and transform input (strings, numbers, arrays, etc.), with extensible interfaces for custom filters—useful for validation pipelines and data processing.

View on GitHub
Deep Wiki
Context7

Writing Filters

Zend\Filter supplies a set of commonly needed filters, but developers will often need to write custom filters for their particular use cases. You can do so by writing classes that implement Zend\Filter\FilterInterface, which defines a single method, filter().

Example

namespace Application\Filter;

use Zend\Filter\FilterInterface;

class MyFilter implements FilterInterface
{
    public function filter($value)
    {
        // perform some transformation upon $value to arrive on $valueFiltered

        return $valueFiltered;
    }
}

To attach an instance of the filter defined above to a filter chain:

$filterChain = new Zend\Filter\FilterChain();
$filterChain->attach(new Application\Filter\MyFilter());

Alternately, add it to the FilterPluginManager:

$filterChain = new Zend\Filter\FilterChain();
$filterChain
    ->getPluginManager()
    ->setInvokableClass('myfilter', Application\Filter\MyFilter::class)
$filterChain->attachByName('myfilter');
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4