CollectionToArrayTransformer::transform()

mixed transform(Collection $collection) Transforms a collection into an array. Parameters Collection $collection A collection of entities Return Value mixed The value in the transformed representation Exceptions TransformationFailedException

CollectionToArrayTransformer::reverseTransform()

mixed reverseTransform(mixed $array) Transforms choice keys into entities. Parameters mixed $array An array of entities Return Value mixed The value in the original representation

CollectionToArrayTransformer

class CollectionToArrayTransformer implements DataTransformerInterface CollectionToArrayTransformer class. Methods mixed transform($collection) Transforms a value from the original representation to a transformed representation. mixed reverseTransform($array) Transforms a value from the transformed representation to its original representation. Details mixed transform($collection) Transforms a value from the original representation to a tr

CollectionToArrayTransformer::reverseTransform()

mixed reverseTransform($array) 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 empty strings). The reasoni

CollectionInterface

interface CollectionInterface implements Countable, IteratorAggregate, ArrayAccess Methods Entry[] toArray() Details Entry[] toArray() Return Value Entry[]

Collection::toArray()

Entry[] toArray() Return Value Entry[]

Collection::offsetGet()

offsetGet($offset) Parameters $offset

Collection::offsetExists()

offsetExists($offset) Parameters $offset

CollectionToArrayTransformer

class CollectionToArrayTransformer implements DataTransformerInterface Methods mixed transform(Collection $collection) Transforms a collection into an array. mixed reverseTransform(mixed $array) Transforms choice keys into entities. Details mixed transform(Collection $collection) Transforms a collection into an array. Parameters Collection $collection A collection of entities Return Value mixed The value in the transformed representation E

Collection::offsetUnset()

offsetUnset($offset) Parameters $offset