reliv/zf-input-filter-service

Uses ZendFrameworks InputFilter config to build filters and validators from services from a general service container

Maintainers

👁 reliv

Package info

github.com/reliv/zf-input-filter-service

pkg:composer/reliv/zf-input-filter-service

Statistics

Installs: 1 091

Dependents: 2

Suggesters: 1

Stars: 0

Open Issues: 0

0.1.1 2017-06-29 19:14 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 2612f844c8d11cdc2fed4964da7113a7d5bdcd23

apimodulemiddlewarereliv

This package is auto-updated.

Last update: 2026-06-11 17:59:05 UTC


README

Allow services as input-filters

  • Uses ZendFrameworks InputFilter config to build filters and validators from services from a general service container.

  • Requires special config values to be added to ZFs standard config format

  • Falls back to ZFs standard input filter factory

  • Utilizes config as:

    [
     'test1' => [
     'name' => 'test1',
     'required' => true,
     'filters' => [
     [
     // Invoked
     'name' => 'ZfInputFilterService\Filter\Test',
     'options' => [
     'test' => 'filterOptionInvoked'
     ],
     ],
     [
     // Service
     'name' => 'ZfInputFilterService\Filter\TestService',
     'service' => true,
     'options' => [
     'test' => 'filterOptionService'
     ]
     ]
     ],
     'validators' => [
     [
     // Invoked
     'name' => 'ZfInputFilterService\Validator\Test',
     'options' => [
     'test' => 'validatorOptionInvoked',
     'messages' => [
     'TEST' => 'validatorMessageTemplateInvoked',
     ],
     ],
     ],
     [
     // Service
     'name' => 'ZfInputFilterService\Validator\TestService',
     'service' => true,
     'options' => [
     'test' => 'validatorOptionService',
     'messages' => [
     'TEST' => 'validatorMessageTemplateService',
     ],
     ],
     ],
     ],
     ],
     // InputFilter Config Sevice
     'subtest1' => [
     // Service
     'name' => 'subtest1',
     'service' => true,
     'type' => 'ZfInputFilterService\InputFilter\TestInputFilter',
     'options' => [
     'test' => 'My test properties'
     ]
     ],
    ],
    
  • NOTE: This is a basic hack to get around the silly way ZF input filters and the factory are written