Usage

Available validators

Simple type validators

  • VirCom\TypesValidator\ArrayValidator - checks is argument is an array type

  • VirCom\TypesValidator\BooleanValidator - checks is argument is a boolean type

  • VirCom\TypesValidator\CallableValidator - checks is argument is a callable type

  • VirCom\TypesValidator\FloatValidator - checks is argument is a float type

  • VirCom\TypesValidator\IntegerValidator - checks is argument is an integer type

  • VirCom\TypesValidator\IterableValidator - checks is argument is an iterable type

  • VirCom\TypesValidator\MixedValidator - nothing to checks :)

  • VirCom\TypesValidator\NullValidator - checks is argument is a null type

  • VirCom\TypesValidator\NumberValidator - checks is argument is an integer or a float type

  • VirCom\TypesValidator\ObjectValidator - checks is argument is an object type

  • VirCom\TypesValidator\ResourceValidator - checks is argument is a resource type

  • VirCom\TypesValidator\StringValidator - checks is argument is a string type

  • VirCom\TypesValidator\ScalarValidator - checks is argument is a scalar type (boolean, integer, float, string)

Example:

Class type validator

Checks that argument is:

  • instance of class

  • instance of class that extends subclass

  • instance of class that implements interface

Example:

Last updated