Skip to content

Filter Service

The filter service uses the Phalcon Filter Component

Configurations

# no ini configuration available yet

Filter Service Provider

PROVIDER_FILTER=\Zemit\Provider\Filter\ServiceProvider

Filter Configurations Object

<?php
new Config([
    'providers' => [
        \Zemit\Provider\Filter\ServiceProvider::class => Env::get('PROVIDER_FILTER', \Zemit\Provider\Filter\ServiceProvider::class),
    ],
    'filters' => [
        // add your own filters here
    ],
]);

Filter Service (filter)

Filter Service Provider

Filter Service Provider (filter): \Zemit\Provider\Filter\ServiceProvider

<?php
// Retrieving the service from an Injectable
$filter = $this->filter;

// Retrieving the service from the DI
$filter = $this->di->get('filter');

// Retrieving the service from the getDI()
$filter = $this->getDI()->get('filter');

// Retrieving the service from anywhere
$filter = Di::getDefault()->get('filter');