removed supports(De)Serializiation()
This commit is contained in:
parent
72b9083ca1
commit
0776b50cf6
@ -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}
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user