Bläddra i källkod

removed setEncoder/removeEncoder/addNormalizer/removeNormalizer

Lukas Kahwe Smith 14 år sedan
förälder
incheckning
c54ab34363

+ 0 - 40
src/Symfony/Component/Serializer/Serializer.php

@@ -211,44 +211,4 @@ class Serializer implements SerializerInterface
 
 
         return $this->encoders[$format];
         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)]);
-    }
 }
 }

+ 0 - 21
src/Symfony/Component/Serializer/SerializerInterface.php

@@ -103,25 +103,4 @@ interface SerializerInterface
      * @return EncoderInterface
      * @return EncoderInterface
      */
      */
     function getEncoder($format);
     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);
 }
 }