Skip to content
Library that offers Input Filtering based on Annotations for use with Objects. Check out 2.dev for 2.0 pre-release.
PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Exception
Mapping
Rules
Filter.php
FilterInterface.php
ObjectWalker.php
README.md

README.md

DMS Filter Component

This library provides a service that can be used to filter object values based on annotations

Usage

<?php
    //Get Doctrine Reader
    $reader = new Annotations\AnnotationReader();
    $reader->setEnableParsePhpImports(true);

    //Load AnnotationLoader
    $loader = new Mapping\Loader\AnnotationLoader($reader);
    $this->loader = $loader;

    //Get a MetadataFactory
    $metadataFactory = new Mapping\ClassMetadataFactory($loader);

    //Get a Filter
    $filter = new Filter($metadataFactory);

    //Filter object
    $filter->filter($object);
?>

Dependencies

This package relies on these external libraries:

  • Doctrine Common: Reader and Cache

Contributing

Feel free to send pull requests, just follow these guides:

Credits

This library is inspired by the Symfony 2 Validator component and is meant to work alongside it.

Symfony 2 Validator: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator

Something went wrong with that request. Please try again.