removed supports(De)Serializiation()

This commit is contained in:
lsmith77 2011-12-14 18:10:48 +01:00
parent 72b9083ca1
commit 0776b50cf6
2 changed files with 2 additions and 34 deletions

View File

@ -65,7 +65,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
*/
public final function serialize($data, $format)
{
if (!$this->supportsSerialization($format)) {
if (!$this->supportsEncoding($format)) {
throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported');
}
@ -83,7 +83,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
*/
public final function deserialize($data, $type, $format)
{
if (!$this->supportsDeserialization($format)) {
if (!$this->supportsDecoding($format)) {
throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported');
}
@ -266,22 +266,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
throw new UnexpectedValueException('Could not denormalize object of type '.$class.', no supporting normalizer found.');
}
/**
* {@inheritdoc}
*/
public function supportsSerialization($format)
{
return $this->supportsEncoding($format);
}
/**
* {@inheritdoc}
*/
public function supportsDeserialization($format)
{
return $this->supportsDecoding($format);
}
/**
* {@inheritdoc}
*/

View File

@ -37,20 +37,4 @@ interface SerializerInterface
* @param string $format
*/
function deserialize($data, $type, $format);
/**
* Checks whether the serializer can serialize to given format
*
* @param string $format format name
* @return Boolean
*/
function supportsSerialization($format);
/**
* Checks whether the serializer can deserialize from given format
*
* @param string $format format name
* @return Boolean
*/
function supportsDeserialization($format);
}