stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/serialization/ 7
in Symfony applications with the Serializer component enabled. • Can access properties directly • Or getters, setters, hassers, adders and removers • Supports calling the constructor during the denormalization process. *PropertyAccess Component required 13
to be available $normalizers = [$datetimeNormalizer, propertyNormalizer]; $encoders = [$jsonEncoder, $csvEncoder, $xmlEncoder]; $serializer = new Serializer( $normalizers, $encoders ); Serializer class 19
array $context = []); • public function deserialize($data, $type, $format, array $context = []); • public function normalize($data, $format = null, array $context = []) • public function denormalize($data, $type, $format = null, array $context = []) • final public function encode($data, $format, array $context = []) • final public function decode($data, $format, array $context = []) 20
when such a case is encountered: echo $serializer->serialize($battle, 'json'); // A circular reference has been detected when serializing the object of class "Battle" (configured limit: 1) Circular Reference 35