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

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

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

DataTransformerInterface

interface DataTransformerInterface Transforms a value between different representations. Methods mixed transform(mixed $value) Transforms a value from the original representation to a transformed representation. mixed reverseTransform(mixed $value) Transforms a value from the transformed representation to its original representation. Details mixed transform(mixed $value) Transforms a value from the original representation to a transformed

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

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

DataTransformerChain::getTransformers()

DataTransformerInterface[] getTransformers() Return Value DataTransformerInterface[]

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

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.

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.