Skip to content

Commit 4140b2d

Browse files
committed
Fix doc
1 parent b409c7b commit 4140b2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,19 @@ curly brackets `{{variable-definition}}`. The processor knows objects, snippets
232232
with `{{objectKey.attributeName}}`, e.g. `{{user.name}}`.
233233

234234
**Snippets** are more complex replacements that will be inserted in your template. This is useful when you need the same complex
235-
text structure in multiple template generations, e.g. for a footer or a header text. Snippets are references in a template by
236-
their keys only: `{{snippetKey}}`. A snippet is implemented by the interface [Snippet](https://github.com/technicalguru/php-utils/blob/main/src/TgUtils/Templating/Snippet.php).
235+
text structure in multiple template generations, e.g. for a footer or a header text. Snippets are referenced in a template by
236+
their keys only: `{{snippetKey}}`. A snippet is implemented by the interface [`Snippet`](https://github.com/technicalguru/php-utils/blob/main/src/TgUtils/Templating/Snippet.php).
237237

238238
**Formatters** can be used to format an object's attribute. Formatters can take parameters to further customize the formatting. A good example
239239
is the [`DateFormatter`](https://github.com/technicalguru/php-utils/blob/main/src/TgUtils/Templating/DateFormatter.php). The formatter
240240
is referenced with the object's attribute by `{{objectKey.attribute:formatterKey:param1:param2...}}`, e.g. `{{user.created_on:date:rfc822}}`.
241241

242-
All three elements - objects, snippets and formatters - are given to the [Processor](https://github.com/technicalguru/php-utils/blob/main/src/TgUtils/Templating/Processor.php) in its constructor:
242+
All three elements - objects, snippets and formatters - are given to the [`Processor`](https://github.com/technicalguru/php-utils/blob/main/src/TgUtils/Templating/Processor.php) in its constructor:
243243

244244
```
245245
$objects = array('user' => $myUser);
246246
$snippets = array('header' => new HeaderSnippet(), 'footer' => $new FooterSnippet());
247-
$formatters = array('date' => new DateFormatter();
247+
$formatters = array('date' => new DateFormatter());
248248
$language = 'en';
249249
$processor = new Processor($objects, $snippets, $formatters, $language);
250250
```

0 commit comments

Comments
 (0)