DataTransformerInterface::reverseTransform()

mixed reverseTransform(mixed $value) Transforms a value from the transformed representation to its original representation. This method is called when {@link Form::submit()} is called to transform the requests tainted data into an acceptable format for your data processing/model layer. This method must be able to deal with empty values. Usually this will be an empty string, but depending on your implementation other empty values are possible as well (such as NULL). The reasoning

DataUriNormalizer

class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface Normalizes an {see \SplFileInfo} object to a data URI. Denormalizes a data URI to a {see \SplFileObject} object. Methods __construct(MimeTypeGuesserInterface $mimeTypeGuesser = null) array|string|bool|int|float|null normalize(object $object, string $format = null, array $context = array()) Normalizes an object into a set of arrays/scalars. bool supportsNormalization(mixed $data, string $format = null

DataUriNormalizer::denormalize()

object denormalize(mixed $data, string $class, string $format = null, array $context = array()) Denormalizes data back into an object of the given class. Parameters mixed $data data to restore string $class the expected class to instantiate string $format format the given data was extracted from array $context options available to the denormalizer Return Value object See also https://gist.github.com/bgrins/6194623

DataTransformerInterface::transform()

mixed transform(mixed $value) Transforms a value from the original representation to a transformed representation. This method is called on two occasions inside a form field: When the form field is initialized with the data attached from the datasource (object or array). When data from a request is submitted using {@link Form::submit()} to transform the new input data back into the renderable format. For example if you have a date field and submit '2009-10-10' you might accept th

DataTransformerChain::getTransformers()

DataTransformerInterface[] getTransformers() Return Value DataTransformerInterface[]

DataMapperInterface::mapFormsToData()

mapFormsToData(FormInterface[] $forms, mixed $data) Maps the data of a list of forms into the properties of some data. Parameters FormInterface[] $forms A list of {@link FormInterface} instances mixed $data Structured data Exceptions UnexpectedTypeException if the type of the data parameter is not supported.

DataTransformerChain::reverseTransform()

mixed reverseTransform(mixed $value) Passes the value through the reverseTransform() method of all nested transformers. The transformers receive the value in the reverse order as they were passed to the constructor. Each transformer receives the result of the previous transformer as input. The output of the last transformer is returned by this method. Parameters mixed $value The value in the transformed representation Return Value mixed The value in the original representation

DataMapperInterface::mapDataToForms()

mapDataToForms(mixed $data, FormInterface[] $forms) Maps properties of some data to a list of forms. Parameters mixed $data Structured data FormInterface[] $forms A list of {@link FormInterface} instances Exceptions UnexpectedTypeException if the type of the data parameter is not supported.

DataTransformerChain

class DataTransformerChain implements DataTransformerInterface Passes a value through multiple value transformers. Methods __construct(array $transformers) Uses the given value transformers to transform values. mixed transform(mixed $value) Passes the value through the transform() method of all nested transformers. mixed reverseTransform(mixed $value) Passes the value through the reverseTransform() method of all nested transformers. DataTransformerInterface[] getTransforme

DataTransformerChain::transform()

mixed transform(mixed $value) Passes the value through the transform() method of all nested transformers. The transformers receive the value in the same order as they were passed to the constructor. Each transformer receives the result of the previous transformer as input. The output of the last transformer is returned by this method. Parameters mixed $value The value in the original representation Return Value mixed The value in the transformed representation Exceptions Transf