Skip to content

Commit

Permalink
[TwigBundle] renamed yaml filter to yaml_encode (to be coherent with …
Browse files Browse the repository at this point in the history
…json_encode)
  • Loading branch information
fabpot committed Nov 19, 2010
1 parent a323dd0 commit e3551b5
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -49,7 +49,7 @@ public function getTemplating()
public function getFilters()
{
return array(
'yaml' => new \Twig_Filter_Method($this, 'yaml'),
'yaml_encode' => new \Twig_Filter_Method($this, 'yamlEncode'),
'dump' => new \Twig_Filter_Method($this, 'dump'),
'abbr_class' => new \Twig_Filter_Method($this, 'abbrClass', array('is_safe' => array('html'))),
'abbr_method' => new \Twig_Filter_Method($this, 'abbrMethod', array('is_safe' => array('html'))),
Expand Down Expand Up @@ -101,7 +101,7 @@ public function getTokenParsers()
);
}

public function yaml($input, $inline = 0)
public function yamlEncode($input, $inline = 0)
{
static $dumper;

Expand Down Expand Up @@ -154,7 +154,7 @@ public function dump($value)
}

if (is_array($value) || is_object($value)) {
return '%'.gettype($value).'% '.$this->yaml($value);
return '%'.gettype($value).'% '.$this->yamlEncode($value);
}

return $value;
Expand Down

0 comments on commit e3551b5

Please sign in to comment.