CardSchemeValidator

class CardSchemeValidator extends ConstraintValidator Validates that a card number belongs to a specified scheme. Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Validates a credit

CardScheme::getRequiredOptions()

array getRequiredOptions() Returns the name of the required options. Override this method if you want to define required options. Return Value array

CardScheme::getDefaultOption()

string getDefaultOption() Returns the name of the default option. Override this method to define a default option. Return Value string

CardScheme

class CardScheme extends Constraint Metadata for the CardSchemeValidator. Constants DEFAULT_GROUP The name of the group given to all constraints with no explicit group. CLASS_CONSTRAINT Marks a constraint that can be put onto classes. PROPERTY_CONSTRAINT Marks a constraint that can be put onto properties. NOT_NUMERIC_ERROR INVALID_FORMAT_ERROR Properties mixed $payload Domain-specific data attached to a constraint. from Constraint array $groups The groups that the con

CamelCaseToSnakeCaseNameConverter::normalize()

string normalize(string $propertyName) Converts a property name to its normalized value. Parameters string $propertyName Return Value string

CamelCaseToSnakeCaseNameConverter::denormalize()

string denormalize(string $propertyName) Converts a property name to its denormalized value. Parameters string $propertyName Return Value string

CamelCaseToSnakeCaseNameConverter

class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface CamelCase to Underscore name converter. Methods __construct(array $attributes = null, bool $lowerCamelCase = true) string normalize(string $propertyName) Converts a property name to its normalized value. string denormalize(string $propertyName) Converts a property name to its denormalized value. Details __construct(array $attributes = null, bool $lowerCamelCase = true)

CallbackValidator

class CallbackValidator extends ConstraintValidator Validator for Callback constraint. Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate($object, Constraint $constraint) Checks if the passed value is valid. Details

CallbackTransformer::transform()

mixed transform(mixed $data) Transforms a value from the original representation to a transformed representation. Parameters mixed $data The value in the original representation Return Value mixed The value in the transformed representation Exceptions UnexpectedTypeException when the argument is not of the expected type TransformationFailedException when the transformation fails

CallbackTransformer::reverseTransform()

mixed reverseTransform(mixed $data) Transforms a value from the transformed representation to its original representation. Parameters mixed $data The value in the transformed representation Return Value mixed The value in the original representation Exceptions UnexpectedTypeException when the argument is not of the expected type TransformationFailedException when the transformation fails