Skip to content
Permalink
Browse files

Only word characters, numbers, . (dot) and _

E.g. arrays (Hash::flatten'ed) to be used in substitutions.

This allows for the standard . notation of arrays to be used within substitions like
attendee.fistname and event.name from e.g. Hash::flatten($entity->toArray());
  • Loading branch information...
hmic committed Jul 6, 2015
1 parent fa01bb1 commit c4ce72154b4b2cd27c2cb3275418349a2db6c04f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/View/StringTemplate.php
@@ -178,7 +178,7 @@ protected function _compileTemplates(array $templates = [])
$this->_compiled[$name] = [null, null];
}
preg_match_all('#\{\{(\w+)\}\}#', $template, $matches);
preg_match_all('#\{\{([\w\d\._]+)\}\}#', $template, $matches);
$this->_compiled[$name] = [
str_replace($matches[0], '%s', $template),
$matches[1]

0 comments on commit c4ce721

Please sign in to comment.
You can’t perform that action at this time.