merged branch lanthaler/master (PR #6030)

This PR was squashed before being merged into the master branch (closes #6030).

Commits
-------

749dac1 Improve docBlock

Discussion
----------

Improve docBlock

This is just a minor change documenting the return type of `SerializerInterface::deserialize()`.
This commit is contained in:
Fabien Potencier 2012-11-17 18:07:16 +01:00
commit 00d132a6d3
10 changed files with 18 additions and 0 deletions

View File

@ -32,6 +32,7 @@ interface DecoderInterface
* Checks whether the serializer can decode from given format
*
* @param string $format format name
*
* @return Boolean
*/
public function supportsDecoding($format);

View File

@ -32,6 +32,7 @@ interface EncoderInterface
* Checks whether the serializer can encode to given format
*
* @param string $format format name
*
* @return Boolean
*/
public function supportsEncoding($format);

View File

@ -96,6 +96,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
* Checks whether the serializer can encode to given format
*
* @param string $format format name
*
* @return Boolean
*/
public function supportsEncoding($format)
@ -107,6 +108,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
* Checks whether the serializer can decode from given format
*
* @param string $format format name
*
* @return Boolean
*/
public function supportsDecoding($format)
@ -116,6 +118,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
/**
* Sets the root node name
*
* @param string $name root node name
*/
public function setRootNodeName($name)

View File

@ -40,6 +40,7 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
*
* @param mixed $data Data to normalize.
* @param string $format The format being (de-)serialized from or into.
*
* @return Boolean
*/
public function supportsNormalization($data, $format = null)
@ -53,6 +54,7 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
* @param mixed $data Data to denormalize from.
* @param string $type The class to which the data should be denormalized.
* @param string $format The format being deserialized from.
*
* @return Boolean
*/
public function supportsDenormalization($data, $type, $format = null)

View File

@ -24,6 +24,7 @@ interface DenormalizerInterface
* @param mixed $data data to restore
* @param string $class the expected class to instantiate
* @param string $format format the given data was extracted from
*
* @return object
*/
public function denormalize($data, $class, $format = null);
@ -34,6 +35,7 @@ interface DenormalizerInterface
* @param mixed $data Data to denormalize from.
* @param string $type The class to which the data should be denormalized.
* @param string $format The format being deserialized from.
*
* @return Boolean
*/
public function supportsDenormalization($data, $type, $format = null);

View File

@ -161,6 +161,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
* Checks if the given class has any get{Property} method.
*
* @param string $class
*
* @return Boolean
*/
private function supports($class)

View File

@ -31,6 +31,7 @@ interface NormalizableInterface
* can use it to normalize objects contained within this object.
* @param string|null $format The format is optionally given to be able to normalize differently
* based on different output formats.
*
* @return array|scalar
*/
public function normalize(NormalizerInterface $normalizer, $format = null);

View File

@ -23,6 +23,7 @@ interface NormalizerInterface
*
* @param object $object object to normalize
* @param string $format format the normalization result will be encoded as
*
* @return array|scalar
*/
public function normalize($object, $format = null);
@ -32,6 +33,7 @@ interface NormalizerInterface
*
* @param mixed $data Data to normalize.
* @param string $format The format being (de-)serialized from or into.
*
* @return Boolean
*/
public function supportsNormalization($data, $format = null);

View File

@ -220,6 +220,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
*
* @param object $object object to normalize
* @param string $format format name, present to give the option to normalizers to act differently based on formats
*
* @return array|scalar
*/
private function normalizeObject($object, $format = null)
@ -250,6 +251,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
* @param mixed $data data to restore
* @param string $class the expected class to instantiate
* @param string $format format name, present to give the option to normalizers to act differently based on formats
*
* @return object
*/
private function denormalizeObject($data, $class, $format = null)

View File

@ -23,6 +23,7 @@ interface SerializerInterface
*
* @param mixed $data any data
* @param string $format format name
*
* @return string
*/
public function serialize($data, $format);
@ -33,6 +34,8 @@ interface SerializerInterface
* @param mixed $data
* @param string $type
* @param string $format
*
* @return object
*/
public function deserialize($data, $type, $format);
}