Commit Graph

103 Commits

Author SHA1 Message Date
Jordi Boggiano
e6a02482c7 [Serializer] Cleaned up SerializerAwareInterface 2011-05-09 17:43:50 +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
89e056bb8b [Serializer] Renamed AbstractEncoder/Normalizer to SerializerAwareEncoder/Normalizer 2011-05-08 18:20:53 +02:00
Jordi Boggiano
1f8defaeeb [Serializer] JsonEncoder doesn't need SerializerAware anymore 2011-05-08 18:17:42 +02:00
Jordi Boggiano
24dcfef33f [Serializer] Added NormalizationAwareInterface 2011-05-08 18:16:53 +02:00
Jordi Boggiano
c20b4a3950 [Serializer] Cleaned up NormalizerInterface 2011-05-08 18:15:00 +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
01a104916b [Serializer] Implement SerializerAwareInterface 2011-05-08 17:53:37 +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
Lukas Kahwe Smith
9f32345887 typo fix 2011-05-07 17:02:06 +02:00
Jordi Boggiano
b9a2eb66e9 [Serializer] CS fixes 2011-05-06 19:37:13 +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
Jordi Boggiano
7a06421cb1 Fixed docs typo 2011-05-06 19:04:22 +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
f11cc2de0b [Seriliazer] [XmlEncoder] Optimize conditions 2011-04-27 08:00:31 -07:00
Joel Wurtz
b6a9935314 [Serializer] [XmlEncoder] Allow decoder to extract attributes in root element 2011-04-27 06:34:41 -07:00
Joel Wurtz
a56e271025 [Serializer] Fix bug when denormalize a class in cache 2011-04-27 03:24:52 -07:00
Eriksen Costa
4db0752894 replaced 'bool' with 'Boolean' 2011-04-27 02:35:03 -03:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Pascal Borreli
b5769c52d6 Fixed various typo 2011-04-22 23:12:50 +00:00
Fabien Potencier
e09a0f9f80 Merge remote branch 'brikou/coding_standards'
* brikou/coding_standards:
  removed empty lines/trailing spaces
2011-04-19 14:06:30 +02:00
Lukas Kahwe Smith
874c4b6e07 added a DecodeInterface (and SerializerAwareInterface) to make it easier to identify if an Encoder also supports decoding 2011-04-17 17:00:42 +02:00
Brikou CARRE
e898445b94 removed empty lines/trailing spaces 2011-04-15 21:12:02 +02:00
Brouznouf
86343b43ec [Serializer] Revert DOMElement to SimpleXmlElement 2011-04-12 11:18:17 +02:00
Brouznouf
8e6233e9c2 [Serializer] Using DOMElement instead of SimpleXmlElement in XmlEncoder to permit some behavior 2011-04-12 00:58:21 +02:00
Jordi Boggiano
7132f81d14 [Serializer] Some more privates 2011-04-03 16:24:25 +02:00
Jordi Boggiano
47733d08a1 [Serializer] Move private methods below protected ones 2011-04-03 16:21:53 +02:00
Jordi Boggiano
54ffb1fbc0 [Serializer] Added @api annotations 2011-04-03 15:49:40 +02:00
Jordi Boggiano
507f6269b5 [Serializer] Added docblocks for NormalizableInterface 2011-04-03 15:44:09 +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
411a382d80 [Serializer] fixed XmlEncoder for single char tags 2011-03-12 15:23:30 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Christophe Coevoet
92bfbf575c Fixed CS 2011-02-27 20:56:29 +01:00
Fabien Potencier
f54cedfe5e added LICENSE files for the subtree repositories 2011-02-22 18:58:15 +01:00
John Wards
73cd26e2ca [Serializer] added the ability to add attributes to nodes using an array key begining with @
Example:

array(
	'foo-bar' => array(
		'@id' => 1,
		'@name' => 'Bar'
	),
	Foo' => array(
		'Bar' => "Test",
		'@Type' => 'test'
	)
)

Parse XML now creates @ attribites for the array.

$rss = array(
   "channel" => array(
     "title" => "Test RSS",
     "description" => "Test description",
     "item" => array(
       0 => array(
         "title" => "Test Title 1",
         "link" => "http://foo.com"
       ),
       1 => array(
         "title" => "Test Title 2",
         "link" => "http://bar.com"
       )
     )
   )
);

<channel>
    <title>Test RSS</title>
    <description>Test description</description>
    <item>
        <title>Test Title 1</title>
        <link>http://foo.com</link>
    </item>
    <item>
        <title>Test Title 2</title>
        <link>http://bar.com</title>
    </item>
</channel>
2011-02-14 22:20:03 +01:00
Jordi Boggiano
f5f41696ec [Serializer] Allow for more flexible element names 2011-02-13 17:47:22 +01:00
Jordi Boggiano
8216a6ef3d [Serializer] Added XmlEncoder::setRootNodeName 2011-02-13 17:47:22 +01:00
Fabian Vogler
9caa17823a Fix for SimpleXML in XmlEncoder
Check first for special objects like SimpleXMLElement and Traversable and the check for is_object.
2011-02-12 21:54:27 +01:00
Lukas Kahwe Smith
dd71501f54 some fixes by just "blindly" trying to make phpStorm code analysis happier 2011-02-04 19:30:28 +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
6f5c2e2d8b [Serializer] Abstract classes now implement their respective interfaces 2011-01-25 11:06:18 +01:00
Jordi Boggiano
cbd4fdd398 [Serializer] JsonEncoder must return arrays only 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