Skip to content

Commit

Permalink
Renamed String Class
Browse files Browse the repository at this point in the history
* due to php v7 String is not alllowed as a class name, renamed it to HandlebarsString to work again
  • Loading branch information
Tobias Weichart committed Apr 13, 2016
1 parent bd44ec5 commit 53eea23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Handlebars/String.php → src/Handlebars/HandlebarsString.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Handlebars;

class String
class HandlebarsString
{
private $string = "";

Expand Down
6 changes: 3 additions & 3 deletions src/Handlebars/Loader/FilesystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Handlebars\Loader;
use Handlebars\Loader;
use Handlebars\String;
use Handlebars\HandlebarsString;


class FilesystemLoader implements Loader
Expand Down Expand Up @@ -78,15 +78,15 @@ 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)
{
if (!isset($this->_templates[$name])) {
$this->_templates[$name] = $this->loadFile($name);
}

return new String($this->_templates[$name]);
return new HandlebarsString($this->_templates[$name]);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Handlebars/Loader/StringLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Handlebars\Loader;
use Handlebars\Loader;
use Handlebars\String;
use Handlebars\HandlebarsString;

class StringLoader implements Loader
{
Expand All @@ -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);
}

}
2 changes: 1 addition & 1 deletion src/Handlebars/Tokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 53eea23

Please sign in to comment.