2017 © Pedro Peláez
 

library validator

Define a specification of PHP entity and check whether the particular item matches it.

image

reflection/validator

Define a specification of PHP entity and check whether the particular item matches it.

  • Monday, April 2, 2018
  • by BR0kEN-
  • Repository
  • 1 Watchers
  • 4 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 23 % Grown

The README.md

Reflection Validator

Build Status Code coverage Quality Score Total Downloads Latest Stable Version License, (*1)

When might it be useful?

Sometimes you may want to have an unlimited sequence of methods, which cannot be restricted/controlled by the interface. In this case on a "compilation" stage, you can restrict those methods to follow the standards you expect., (*2)

A real example from Drupal/Symfony world: http://cgit.drupalcode.org/form_alter_service/tree/src/FormAlterCompilerPass.php, (*3)

Examples

Besides of fully-operable examples, you can check a quick use case:, (*4)

(new MethodValidator(object<ReflectionMethod>, string<FQCN>))
    ->addArgument(
        (new ArgumentSpecification('form'))
            ->setType('array')
            ->setOptional(false)
            ->setPassedByReference(true)
    )
    ->addArgument(
        (new ArgumentSpecification('formState'))
            ->setType(Iterator::class)
            ->setOptional(false)
            ->setPassedByReference(false)
    );

The Versions

02/04 2018

dev-master

9999999-dev https://github.com/BR0kEN-/reflection-validator

Define a specification of PHP entity and check whether the particular item matches it.

  Sources   Download

MIT

The Requires

 

The Development Requires

function validator reflection validate method

02/04 2018

1.0.1

1.0.1.0 https://github.com/BR0kEN-/reflection-validator

Define a specification of PHP entity and check whether the particular item matches it.

  Sources   Download

MIT

The Requires

 

The Development Requires

function validator reflection validate method

01/08 2017

1.0.0

1.0.0.0 https://github.com/BR0kEN-/reflection-validator

Define a specification of PHP entity and check whether the particular item matches it.

  Sources   Download

MIT

The Requires

 

The Development Requires

function validator reflection validate method