From cea63809ae0ce51b1c6ebc374568a358f9f35ae6 Mon Sep 17 00:00:00 2001 From: Nathan Macnamara Date: Thu, 8 Jan 2015 09:20:56 +0000 Subject: [PATCH] Change parser() function name to parse() --- README.md | 2 +- src/Parser.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 981c7fd..be6aa22 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/Parser.php b/src/Parser.php index ebce959..43c5af5 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -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); } @@ -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()); } /** @@ -220,7 +220,7 @@ public function xml($payload) */ public function json($payload) { - return $this->parser($payload, new JSON()); + return $this->parse($payload, new JSON()); } /** @@ -234,7 +234,7 @@ public function json($payload) */ public function bson($payload) { - return $this->parser($payload, new BSON()); + return $this->parse($payload, new BSON()); } /** @@ -248,7 +248,7 @@ public function bson($payload) */ public function serialize($payload) { - return $this->parser($payload, new Serialize()); + return $this->parse($payload, new Serialize()); } /** @@ -260,7 +260,7 @@ public function serialize($payload) */ public function querystr($payload) { - return $this->parser($payload, new QueryStr()); + return $this->parse($payload, new QueryStr()); } /** @@ -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 ------------ */