소스 검색

renamed hasEncoder/hasDecoder to supportsSerialization/supportsDeserialization

Lukas Kahwe Smith 14 년 전
부모
커밋
054e41573e
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 2
      src/Symfony/Component/Serializer/Serializer.php
  2. 4 4
      src/Symfony/Component/Serializer/SerializerInterface.php

+ 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