Ver código fonte

renamed hasEncoder/hasDecoder to supportsSerialization/supportsDeserialization

Lukas Kahwe Smith 14 anos atrás
pai
commit
054e41573e

+ 2 - 2
src/Symfony/Component/Serializer/Serializer.php

@@ -204,7 +204,7 @@ class Serializer implements SerializerInterface
     /**
      * {@inheritdoc}
      */
-    public function hasEncoder($format)
+    public function supportsSerialization($format)
     {
         return isset($this->encoders[$format]);
     }
@@ -212,7 +212,7 @@ class Serializer implements SerializerInterface
     /**
      * {@inheritdoc}
      */
-    public function hasDecoder($format)
+    public function supportsDeserialization($format)
     {
         return isset($this->encoders[$format]) && $this->encoders[$format] instanceof DecoderInterface;
     }

+ 4 - 4
src/Symfony/Component/Serializer/SerializerInterface.php

@@ -124,20 +124,20 @@ interface SerializerInterface
     function getEncoder($format);
 
     /**
-     * Checks whether the serializer has an encoder registered for the given format
+     * Checks whether the serializer can serialize the given format
      *
      * @param string $format format name
      * @return Boolean
      */
-    function hasEncoder($format);
+    function supportsSerialization($format);
 
     /**
-     * Checks whether the serializer has a decoder registered for the given format
+     * Checks whether the serializer can deserialize the given format
      *
      * @param string $format format name
      * @return Boolean
      */
-    function hasDecoder($format);
+    function supportsDeserialization($format);
 
     /**
      * @param string $format format name