Fabien Potencier
711788b794
fixed CS
2014-03-27 08:45:48 +01:00
Sascha Grossenbacher
e7389aa24c
Move normalizer cache to getNormalier()/getDenormalizer(), use those in normalizeObject()/denormalizeObject()
2014-03-27 08:44:58 +01:00
Fabien Potencier
498bfa33fa
Merge branch '2.2'
...
* 2.2:
fixed CS
Fixed XML syntax.
Fixed parsing of leading blank lines in folded scalars. Closes #7989 .
[Form] Fixed a method name.
Added a test case for Loader::import().
Fixed Loader import
[Console] Added dedicated testcase for HelperSet class
[Serializer] fixed CS (refs #7971 )
Fixed fatal error in normalize/denormalizeObject.
Fixed 2 namespaces
Conflicts:
src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
src/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php
2013-05-10 20:12:13 +02:00
Fabien Potencier
e3187590c0
[Serializer] fixed CS (refs #7971 )
2013-05-08 10:39:40 +02:00
Lin Clark
60edc58325
Fixed fatal error in normalize/denormalizeObject.
2013-05-08 10:37:01 +02:00
dantleech
e655120f05
Enforce sprintf for exceptions
2013-04-11 08:50:46 +02:00
Benjamin Eberlei
b6bdb450e3
Completly refactor the Serializer Options Pull Request to push context information directly and avoid state and dependencies between SerializerInterface and encoders/normalizers.
2013-01-18 14:08:59 +01:00
Benjamin Eberlei
eacb7e2a36
Rename $options to $context, as it makes the intent much more clear.
2013-01-04 20:06:05 +02:00
Benjamin Eberlei
8854b85abf
Fix CS issues, removed global options
2013-01-04 20:06:04 +02:00
Benjamin Eberlei
9c54a4b552
[Serializer] Allow options to be passed to SerialiizerInterface#serialize and #unserialize. Thsee options are available to all encoders/decoders/normalizers that implement SerializerAwareInterface.
2013-01-04 20:06:04 +02:00
Florin Patan
c2acc6c2cb
Fixed most of the docblocks/unused namespaces
2012-12-19 08:09:49 +01:00
Markus Lanthaler
749dac1e38
Improve docBlock
2012-11-17 18:07:16 +01:00
Christophe Coevoet
12bdec3cd2
Moved the NormalizationAwareInterface check to the ChainEncoder
...
This allows nesting a ChainEncoder inside another one without breaking
the check.
2012-07-14 12:15:12 +02:00
Christophe Coevoet
28e137c920
[Serializer] Added a ChainEncoder and a ChainDecoder
...
These classes contains the logic previously defined in the Serializer
itself to handle the choice of a serializer. This allows reusing it when
using only the encoding part of the component.
2012-07-14 12:15:07 +02:00
Fabien Potencier
d100ffaf76
fixed CS
2012-07-09 14:54:20 +02:00
Fabien Potencier
41621e42e9
fixed phpdoc @param alignment
2012-05-15 22:19:31 +02:00
Eriksen Costa
2cac50d8a9
fixed CS (missing or misplaced license blocks)
2012-04-02 00:52:14 -03:00
Eriksen Costa
013f998bb8
updated license blocks
2012-03-31 18:00:32 -03:00
Fabien Potencier
6504d05804
fixed CS
2011-12-18 14:36:25 +01:00
lsmith77
0776b50cf6
removed supports(De)Serializiation()
2011-12-14 18:10:48 +01:00
lsmith77
97389fa349
use Serializer specific RuntimeException
2011-12-11 21:01:02 +01:00
lsmith77
967531faa5
fixed various typos from the refactoring
2011-12-11 20:53:57 +01:00
Lukas Kahwe Smith
c3d61232c9
re-added supports(de)normalization()
2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
078f7f3ecd
more typo fixes
2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
2a6741c288
typo fix
2011-12-11 20:03:01 +01:00
Lukas Kahwe Smith
d021dc82a7
refactored encoder handling to use the supports*() methods to determine which encoder handles what format
2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
f8e2787224
refactored Normalizer interfaces
2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
58bd0f5822
refactored the EncoderInterface
2011-12-11 20:03:00 +01:00
Lukas Kahwe Smith
b0daf3516f
split off an EncoderInterface and NormalizerInterface from SerializerInterface
2011-12-11 20:03:00 +01:00
Eric Clemmons
7346896129
Changed Serialized#supportsNormalization to PRIVATE
2011-11-07 19:25:58 -08:00
Eric Clemmons
d789f9424e
Serializer#normalize gives precedence to objects that support normalization
2011-11-07 19:25:58 -08:00
Eric Clemmons
9e6ba9ae89
Added protected Serializer#supportsNormalization
...
This is very useful for cleaning up the logic in Serializer#normalize
and allow easy checking of both the cache & stored normalizers
2011-11-07 19:25:58 -08:00
Fabien Potencier
851eb73778
removed unused use statements
2011-10-29 11:56:30 +02:00
Oncle Tom
ae55a98604
Added $format in serialize() method, to keep consistence and give a hint to the normalizer.
2011-08-12 12:01:28 +03:00
Lukas Kahwe Smith
f67b3f508e
more encoder lazy loading tweaks
2011-06-09 14:51:26 +02:00
Lukas Kahwe Smith
4b3f6215b7
always use getEncoder() to enable lazy loading
2011-06-09 14:51:26 +02:00
Lukas Kahwe Smith
64c8a1ab8c
cosmetic tweak
2011-06-09 14:51:25 +02:00
Lukas Kahwe Smith
c54ab34363
removed setEncoder/removeEncoder/addNormalizer/removeNormalizer
2011-06-09 14:51:25 +02:00
Lukas Kahwe Smith
c470d8b273
moved the methods that can later be moved to a Builder to the bottom
2011-06-09 14:51:25 +02:00
Lukas Kahwe Smith
5b3ccba2a1
use getEncoder inside encode/decode
2011-06-09 14:51:25 +02:00
Lukas Kahwe Smith
7ecd5e7590
made serialize/deserialize/encode/decode final
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
52b8cb622d
added Constructor
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
46da5ff069
added Exception's from SerializerBundle
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
1eecf1a5d1
made (de)normalizeObject() private
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
054e41573e
renamed hasEncoder/hasDecoder to supportsSerialization/supportsDeserialization
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
900dda8239
notice fixes
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
9fdfac81ec
typo fixes
2011-06-09 14:50:55 +02:00
Lukas Kahwe Smith
c3acd5df54
all encoders implement EncoderInterface
2011-06-09 14:50:54 +02:00
Lukas Kahwe Smith
e694397f16
removed redundant management of encoders and decoders, aka assume all decoders are also encoders
...
anything else is a total edge case that doesnt break with this change. it just means that for that edge case it will not be possible to "statically" determine if the encoder doesnt actually support encoding.
2011-06-09 14:50:54 +02:00
Fabien Potencier
62e4342a86
fixed CS
2011-06-08 12:12:55 +02:00
Lukas Kahwe Smith
34ac2fe200
fixed a typo
2011-06-06 17:29:50 +02:00
Pierre Minnieur
8bc13b9cdd
fixed wrong usage of supportsDenormalization()
(@see NormalizerInterface)
2011-05-21 05:48:27 -07:00
Jordi Boggiano
9e19e772bc
[Serializer] Restored docblocks from the deleted methods on SerializerInterface
2011-05-10 09:27:20 +02:00
Jordi Boggiano
457dc105bc
[Serializer] minor optimization
2011-05-10 09:19:55 +02:00
Jordi Boggiano
99c67134fe
[Serializer] Split decoder/encoder maps
2011-05-10 09:17:33 +02:00
Jordi Boggiano
f8447aa74c
[Serializer] NormalizableInterface now takes a Serializer and make sure the is always optional
2011-05-09 13:59:54 +02:00
Jordi Boggiano
3b88608d85
[Serializer] Fixed typo
2011-05-08 18:34:06 +02:00
Jordi Boggiano
9311b0a7e5
[Serializer] Removed properties argument
2011-05-08 18:32:22 +02:00
Jordi Boggiano
24dcfef33f
[Serializer] Added NormalizationAwareInterface
2011-05-08 18:16:53 +02:00
Jordi Boggiano
4104c7b073
[Serializer] Inlined back the logic from isStructuredType and removed the method
2011-05-08 18:14:44 +02:00
Jordi Boggiano
3ecc9602e4
[Serializer] Add checks for SerializerAwareInterface
2011-05-08 17:54:55 +02:00
Jordi Boggiano
8263b09b5c
[Serializer] Properly check for the DecoderInterface
2011-05-08 17:52:25 +02:00
Jordi Boggiano
fe7119da8a
[Serializer] serialize shouldn't normalize since it's the encoder's job to do that when they require it
2011-05-08 15:17:42 +02:00
Jordi Boggiano
ded30a2937
[Serializer] Split supports in supportsNormalization and supportsDenormalization
2011-05-06 19:36:56 +02:00
Jordi Boggiano
919f16a7d6
[Serializer] Add support for Traversable objects
2011-05-06 19:04:39 +02:00
Johannes Schmitt
ec1199eda7
[Serializer] updated SerializerInterface
2011-05-06 13:01:19 +02:00
Lukas Kahwe Smith
3248f02067
make it possible to read the normalizerCache when inheriting
...
see https://github.com/FriendsOfSymfony/RestBundle/compare/lazy_normalizer_refactoring
2011-04-29 23:51:37 +02:00
Joel Wurtz
a56e271025
[Serializer] Fix bug when denormalize a class in cache
2011-04-27 03:24:52 -07:00
Jordi Boggiano
7132f81d14
[Serializer] Some more privates
2011-04-03 16:24:25 +02:00
Jordi Boggiano
76cab7deb9
[Serializer] add methods to the SerializerInterface
2011-04-03 15:15:53 +02:00
Jordi Boggiano
cb727dbde3
[Serializer] Added docblock
2011-04-03 15:14:07 +02:00
Jordi Boggiano
424a1dad27
[Serializer] Switched most protected to private or final
2011-04-03 15:13:21 +02:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Lukas Kahwe Smith
46d900682f
is_scalar(null) !== true
2011-02-01 13:55:10 +01:00
Bulat Shakirzyanov
5252d3aef0
[Serializer] switched to setEncoder, to be consistent with getEncoder
2011-01-28 18:24:34 +01:00
Jordi Boggiano
08f8b223ff
[Serializer] Added hasEncoder and getEncoder to the SerializerInterface
2011-01-25 11:06:18 +01:00
Jordi Boggiano
005c1d9df8
[Serializer] Added initial version of the Serializer component
2011-01-23 12:34:47 +01:00