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
|
* Checks whether the serializer can decode from given format
|
||||||
*
|
*
|
||||||
* @param string $format format name
|
* @param string $format format name
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsDecoding($format);
|
public function supportsDecoding($format);
|
||||||
|
@ -32,6 +32,7 @@ interface EncoderInterface
|
|||||||
* Checks whether the serializer can encode to given format
|
* Checks whether the serializer can encode to given format
|
||||||
*
|
*
|
||||||
* @param string $format format name
|
* @param string $format format name
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsEncoding($format);
|
public function supportsEncoding($format);
|
||||||
|
@ -96,6 +96,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
|||||||
* Checks whether the serializer can encode to given format
|
* Checks whether the serializer can encode to given format
|
||||||
*
|
*
|
||||||
* @param string $format format name
|
* @param string $format format name
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsEncoding($format)
|
public function supportsEncoding($format)
|
||||||
@ -107,6 +108,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
|||||||
* Checks whether the serializer can decode from given format
|
* Checks whether the serializer can decode from given format
|
||||||
*
|
*
|
||||||
* @param string $format format name
|
* @param string $format format name
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsDecoding($format)
|
public function supportsDecoding($format)
|
||||||
@ -116,6 +118,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the root node name
|
* Sets the root node name
|
||||||
|
*
|
||||||
* @param string $name root node name
|
* @param string $name root node name
|
||||||
*/
|
*/
|
||||||
public function setRootNodeName($name)
|
public function setRootNodeName($name)
|
||||||
|
@ -40,6 +40,7 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
|
|||||||
*
|
*
|
||||||
* @param mixed $data Data to normalize.
|
* @param mixed $data Data to normalize.
|
||||||
* @param string $format The format being (de-)serialized from or into.
|
* @param string $format The format being (de-)serialized from or into.
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsNormalization($data, $format = null)
|
public function supportsNormalization($data, $format = null)
|
||||||
@ -53,6 +54,7 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
|
|||||||
* @param mixed $data Data to denormalize from.
|
* @param mixed $data Data to denormalize from.
|
||||||
* @param string $type The class to which the data should be denormalized.
|
* @param string $type The class to which the data should be denormalized.
|
||||||
* @param string $format The format being deserialized from.
|
* @param string $format The format being deserialized from.
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsDenormalization($data, $type, $format = null)
|
public function supportsDenormalization($data, $type, $format = null)
|
||||||
|
@ -24,6 +24,7 @@ interface DenormalizerInterface
|
|||||||
* @param mixed $data data to restore
|
* @param mixed $data data to restore
|
||||||
* @param string $class the expected class to instantiate
|
* @param string $class the expected class to instantiate
|
||||||
* @param string $format format the given data was extracted from
|
* @param string $format format the given data was extracted from
|
||||||
|
*
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function denormalize($data, $class, $format = null);
|
public function denormalize($data, $class, $format = null);
|
||||||
@ -34,6 +35,7 @@ interface DenormalizerInterface
|
|||||||
* @param mixed $data Data to denormalize from.
|
* @param mixed $data Data to denormalize from.
|
||||||
* @param string $type The class to which the data should be denormalized.
|
* @param string $type The class to which the data should be denormalized.
|
||||||
* @param string $format The format being deserialized from.
|
* @param string $format The format being deserialized from.
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsDenormalization($data, $type, $format = null);
|
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.
|
* Checks if the given class has any get{Property} method.
|
||||||
*
|
*
|
||||||
* @param string $class
|
* @param string $class
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
private function supports($class)
|
private function supports($class)
|
||||||
|
@ -31,6 +31,7 @@ interface NormalizableInterface
|
|||||||
* can use it to normalize objects contained within this object.
|
* 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
|
* @param string|null $format The format is optionally given to be able to normalize differently
|
||||||
* based on different output formats.
|
* based on different output formats.
|
||||||
|
*
|
||||||
* @return array|scalar
|
* @return array|scalar
|
||||||
*/
|
*/
|
||||||
public function normalize(NormalizerInterface $normalizer, $format = null);
|
public function normalize(NormalizerInterface $normalizer, $format = null);
|
||||||
|
@ -23,6 +23,7 @@ interface NormalizerInterface
|
|||||||
*
|
*
|
||||||
* @param object $object object to normalize
|
* @param object $object object to normalize
|
||||||
* @param string $format format the normalization result will be encoded as
|
* @param string $format format the normalization result will be encoded as
|
||||||
|
*
|
||||||
* @return array|scalar
|
* @return array|scalar
|
||||||
*/
|
*/
|
||||||
public function normalize($object, $format = null);
|
public function normalize($object, $format = null);
|
||||||
@ -32,6 +33,7 @@ interface NormalizerInterface
|
|||||||
*
|
*
|
||||||
* @param mixed $data Data to normalize.
|
* @param mixed $data Data to normalize.
|
||||||
* @param string $format The format being (de-)serialized from or into.
|
* @param string $format The format being (de-)serialized from or into.
|
||||||
|
*
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
*/
|
*/
|
||||||
public function supportsNormalization($data, $format = null);
|
public function supportsNormalization($data, $format = null);
|
||||||
|
@ -220,6 +220,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
*
|
*
|
||||||
* @param object $object object to normalize
|
* @param object $object object to normalize
|
||||||
* @param string $format format name, present to give the option to normalizers to act differently based on formats
|
* @param string $format format name, present to give the option to normalizers to act differently based on formats
|
||||||
|
*
|
||||||
* @return array|scalar
|
* @return array|scalar
|
||||||
*/
|
*/
|
||||||
private function normalizeObject($object, $format = null)
|
private function normalizeObject($object, $format = null)
|
||||||
@ -250,6 +251,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
* @param mixed $data data to restore
|
* @param mixed $data data to restore
|
||||||
* @param string $class the expected class to instantiate
|
* @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
|
* @param string $format format name, present to give the option to normalizers to act differently based on formats
|
||||||
|
*
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
private function denormalizeObject($data, $class, $format = null)
|
private function denormalizeObject($data, $class, $format = null)
|
||||||
|
@ -23,6 +23,7 @@ interface SerializerInterface
|
|||||||
*
|
*
|
||||||
* @param mixed $data any data
|
* @param mixed $data any data
|
||||||
* @param string $format format name
|
* @param string $format format name
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function serialize($data, $format);
|
public function serialize($data, $format);
|
||||||
@ -33,6 +34,8 @@ interface SerializerInterface
|
|||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $format
|
* @param string $format
|
||||||
|
*
|
||||||
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function deserialize($data, $type, $format);
|
public function deserialize($data, $type, $format);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user