Skip to content

Commit

Permalink
renamed hasEncoder/hasDecoder to supportsSerialization/supportsDeseri…
Browse files Browse the repository at this point in the history
…alization
  • Loading branch information
lsmith77 committed Jun 9, 2011
1 parent e17e09e commit d2b9385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ public function getEncoder($format)
/**
* {@inheritdoc}
*/
public function hasEncoder($format)
public function supportsSerialization($format)
{
return isset($this->encoders[$format]);
}

/**
* {@inheritdoc}
*/
public function hasDecoder($format)
public function supportsDeserialization($format)
{
return isset($this->encoders[$format]) && $this->encoders[$format] instanceof DecoderInterface;
}
Expand Down
8 changes: 4 additions & 4 deletions SerializerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@ function setEncoder($format, EncoderInterface $encoder);
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
Expand Down

0 comments on commit d2b9385

Please sign in to comment.