Skip to content

Commit

Permalink
Change parser() function name to parse()
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmac committed Jan 8, 2015
1 parent e621740 commit cea6380
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class CustomFormatter implements FormatInterface {
use Acme\Formatters\CustomFormatter;

$parser = new Parser();
$parsed = $parser->parser('RAW PAYLOAD DATA', new CustomFormatter());
$parsed = $parser->parse('RAW PAYLOAD DATA', new CustomFormatter());
```

Testing
Expand Down
14 changes: 7 additions & 7 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected function getPayload()
*
* @return array
*/
public function parser($payload, FormatInterface $format)
public function parse($payload, FormatInterface $format)
{
return $format->parse($payload);
}
Expand All @@ -206,7 +206,7 @@ public function parser($payload, FormatInterface $format)
*/
public function xml($payload)
{
return $this->parser($payload, new XML());
return $this->parse($payload, new XML());
}

/**
Expand All @@ -220,7 +220,7 @@ public function xml($payload)
*/
public function json($payload)
{
return $this->parser($payload, new JSON());
return $this->parse($payload, new JSON());
}

/**
Expand All @@ -234,7 +234,7 @@ public function json($payload)
*/
public function bson($payload)
{
return $this->parser($payload, new BSON());
return $this->parse($payload, new BSON());
}

/**
Expand All @@ -248,7 +248,7 @@ public function bson($payload)
*/
public function serialize($payload)
{
return $this->parser($payload, new Serialize());
return $this->parse($payload, new Serialize());
}

/**
Expand All @@ -260,7 +260,7 @@ public function serialize($payload)
*/
public function querystr($payload)
{
return $this->parser($payload, new QueryStr());
return $this->parse($payload, new QueryStr());
}

/**
Expand All @@ -274,7 +274,7 @@ public function querystr($payload)
*/
public function yaml($payload)
{
return $this->parser($payload, new Yaml());
return $this->parse($payload, new Yaml());
}

/* ------------ Construction Methods ------------ */
Expand Down

0 comments on commit cea6380

Please sign in to comment.