[Serializer] Added @api annotations

This commit is contained in:
Jordi Boggiano 2011-04-03 15:49:40 +02:00
parent 507f6269b5
commit 54ffb1fbc0
3 changed files with 13 additions and 1 deletions

View File

@ -26,6 +26,7 @@ interface EncoderInterface
* @param mixed $data data to encode
* @param string $format format to encode to
* @return string
* @api
*/
function encode($data, $format);
@ -35,6 +36,7 @@ interface EncoderInterface
* @param string $data data to decode
* @param string $format format to decode from
* @return mixed
* @api
*/
function decode($data, $format);
@ -42,6 +44,7 @@ interface EncoderInterface
* Sets the owning Serializer object
*
* @param SerializerInterface $serializer
* @api
*/
function setSerializer(SerializerInterface $serializer);
@ -49,6 +52,7 @@ interface EncoderInterface
* Gets the owning Serializer object
*
* @return SerializerInterface
* @api
*/
function getSerializer();
}

View File

@ -27,6 +27,7 @@ interface NormalizerInterface
* @param string $format format the normalization result will be encoded as
* @param array $properties a list of properties to extract, if null all properties are returned
* @return array|scalar
* @api
*/
function normalize($object, $format, $properties = null);
@ -37,6 +38,7 @@ interface NormalizerInterface
* @param string $class the expected class to instantiate
* @param string $format format the given data was extracted from
* @return object
* @api
*/
function denormalize($data, $class, $format = null);
@ -46,6 +48,7 @@ interface NormalizerInterface
* @param ReflectionClass $class
* @param string $format format the given data was extracted from
* @return Boolean
* @api
*/
function supports(\ReflectionClass $class, $format = null);
@ -53,6 +56,7 @@ interface NormalizerInterface
* Sets the owning Serializer object
*
* @param SerializerInterface $serializer
* @api
*/
function setSerializer(SerializerInterface $serializer);
@ -60,6 +64,7 @@ interface NormalizerInterface
* Gets the owning Serializer object
*
* @return SerializerInterface
* @api
*/
function getSerializer();
}

View File

@ -27,6 +27,7 @@ interface SerializerInterface
* @param mixed $data any data
* @param string $format format name
* @return string
* @api
*/
function serialize($data, $format);
@ -36,6 +37,7 @@ interface SerializerInterface
* @param mixed $data data to normalize
* @param string $format format name, present to give the option to normalizers to act differently based on formats
* @return array|scalar
* @api
*/
function normalize($data, $format);
@ -65,6 +67,7 @@ interface SerializerInterface
* @param mixed $data data to encode
* @param string $format format name
* @return array|scalar
* @api
*/
function encode($data, $format);
@ -74,10 +77,10 @@ interface SerializerInterface
* @param string $data data to decode
* @param string $format format name
* @return mixed
* @api
*/
function decode($data, $format);
/**
* @param NormalizerInterface $normalizer
*/