From 53eea2365e27075e26fe75d2329b4a9588c23873 Mon Sep 17 00:00:00 2001 From: Tobias Weichart Date: Wed, 13 Apr 2016 12:43:57 +0200 Subject: [PATCH] Renamed String Class * due to php v7 String is not alllowed as a class name, renamed it to HandlebarsString to work again --- src/Handlebars/{String.php => HandlebarsString.php} | 2 +- src/Handlebars/Loader/FilesystemLoader.php | 6 +++--- src/Handlebars/Loader/StringLoader.php | 6 +++--- src/Handlebars/Tokenizer.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/Handlebars/{String.php => HandlebarsString.php} (97%) mode change 100755 => 100644 diff --git a/src/Handlebars/String.php b/src/Handlebars/HandlebarsString.php old mode 100755 new mode 100644 similarity index 97% rename from src/Handlebars/String.php rename to src/Handlebars/HandlebarsString.php index 323cdd3..9efc101 --- a/src/Handlebars/String.php +++ b/src/Handlebars/HandlebarsString.php @@ -16,7 +16,7 @@ namespace Handlebars; -class String +class HandlebarsString { private $string = ""; diff --git a/src/Handlebars/Loader/FilesystemLoader.php b/src/Handlebars/Loader/FilesystemLoader.php index 475ef89..22adb83 100755 --- a/src/Handlebars/Loader/FilesystemLoader.php +++ b/src/Handlebars/Loader/FilesystemLoader.php @@ -15,7 +15,7 @@ namespace Handlebars\Loader; use Handlebars\Loader; -use Handlebars\String; +use Handlebars\HandlebarsString; class FilesystemLoader implements Loader @@ -78,7 +78,7 @@ public function __construct($baseDirs, Array $options = []) * * @param string $name template name * - * @return String Handlebars Template source + * @return HandlebarsString Handlebars Template source */ public function load($name) { @@ -86,7 +86,7 @@ public function load($name) $this->_templates[$name] = $this->loadFile($name); } - return new String($this->_templates[$name]); + return new HandlebarsString($this->_templates[$name]); } /** diff --git a/src/Handlebars/Loader/StringLoader.php b/src/Handlebars/Loader/StringLoader.php index 6c04efa..70dc369 100755 --- a/src/Handlebars/Loader/StringLoader.php +++ b/src/Handlebars/Loader/StringLoader.php @@ -16,7 +16,7 @@ namespace Handlebars\Loader; use Handlebars\Loader; -use Handlebars\String; +use Handlebars\HandlebarsString; class StringLoader implements Loader { @@ -26,11 +26,11 @@ class StringLoader implements Loader * * @param string $name Handlebars Template source * - * @return String Handlebars Template source + * @return HandlebarsString Handlebars Template source */ public function load($name) { - return new String($name); + return new HandlebarsString($name); } } diff --git a/src/Handlebars/Tokenizer.php b/src/Handlebars/Tokenizer.php index f2c5f13..89bdfc3 100644 --- a/src/Handlebars/Tokenizer.php +++ b/src/Handlebars/Tokenizer.php @@ -92,7 +92,7 @@ class Tokenizer */ public function scan($text, $delimiters = null) { - if ($text instanceof String) { + if ($text instanceof HandlebarsString) { $text = $text->getString(); } $this->reset();