Improve docBlock
This commit is contained in:
parent
4ad1e14056
commit
749dac1e38
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user