From 56dac82fa4e2fa9204fad977c3ce78c901d5acd3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 19 Aug 2019 17:11:47 +0300 Subject: [PATCH] Flextype Core: Add ability to work with different types of content #212 #186 - Parser.php refactoring --- flextype/parsers/Parser.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flextype/parsers/Parser.php b/flextype/parsers/Parser.php index a37a8741..fec18d71 100644 --- a/flextype/parsers/Parser.php +++ b/flextype/parsers/Parser.php @@ -12,18 +12,18 @@ namespace Flextype; class Parser { /** - * Default driver + * Default parser * * @var array */ - public static $default_driver = 'frontmatter'; + public static $default_parser = 'frontmatter'; /** - * Drivers + * Parsers * * @var array */ - public static $drivers = [ + public static $parsers = [ 'frontmatter' => [ 'name' => 'frontmatter', 'ext' => 'md', @@ -37,9 +37,9 @@ class Parser ], ]; - public static function encode($input, string $driver) : string + public static function encode($input, string $parser) : string { - switch ($driver) { + switch ($parser) { case 'frontmatter': return FrontmatterParser::encode($input); @@ -58,9 +58,9 @@ class Parser } } - public static function decode(string $input, string $driver) + public static function decode(string $input, string $parser) { - switch ($driver) { + switch ($parser) { case 'frontmatter': return FrontmatterParser::decode($input);