From c54ab343634241f689068467af516254835bd870 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Wed, 8 Jun 2011 00:13:33 +0200 Subject: [PATCH] removed setEncoder/removeEncoder/addNormalizer/removeNormalizer --- .../Component/Serializer/Serializer.php | 40 ------------------- .../Serializer/SerializerInterface.php | 21 ---------- 2 files changed, 61 deletions(-) diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 030b00d547..c58d4172a5 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -211,44 +211,4 @@ class Serializer implements SerializerInterface return $this->encoders[$format]; } - - /** - * {@inheritdoc} - */ - public function setEncoder($format, EncoderInterface $encoder) - { - $this->encoders[$format] = $encoder; - if ($encoder instanceof SerializerAwareInterface) { - $encoder->setSerializer($this); - } - } - - /** - * {@inheritdoc} - */ - public function removeEncoder($format) - { - if (isset($this->encoders[$format])) { - unset($this->encoders[$format]); - } - } - - /** - * {@inheritdoc} - */ - public function addNormalizer(NormalizerInterface $normalizer) - { - $this->normalizers[] = $normalizer; - if ($normalizer instanceof SerializerAwareInterface) { - $normalizer->setSerializer($this); - } - } - - /** - * {@inheritdoc} - */ - public function removeNormalizer(NormalizerInterface $normalizer) - { - unset($this->normalizers[array_search($normalizer, $this->normalizers, true)]); - } } diff --git a/src/Symfony/Component/Serializer/SerializerInterface.php b/src/Symfony/Component/Serializer/SerializerInterface.php index e8861f81b8..1f73d5a55e 100644 --- a/src/Symfony/Component/Serializer/SerializerInterface.php +++ b/src/Symfony/Component/Serializer/SerializerInterface.php @@ -103,25 +103,4 @@ interface SerializerInterface * @return EncoderInterface */ function getEncoder($format); - - /** - * @param string $format format name - * @param EncoderInterface $encoder - */ - function setEncoder($format, EncoderInterface $encoder); - - /** - * @param string $format format name - */ - function removeEncoder($format); - - /** - * @param NormalizerInterface $normalizer - */ - function addNormalizer(NormalizerInterface $normalizer); - - /** - * @param NormalizerInterface $normalizer - */ - function removeNormalizer(NormalizerInterface $normalizer); }