Skip to content

Commit a13ada9

Browse files
authored
Merge pull request #39 from llvdl/textual-change
textual change in README.md
2 parents 8401136 + dbf7327 commit a13ada9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ This is a renderer for rendering PHP view scripts into a PSR-7 Response object.
1010
Note that PHP-View has no built-in mitigation from XSS attacks. It is the developer's responsibility to use `htmlspecialchars()` or a component like [zend-escaper](https://github.com/zendframework/zend-escaper). Alternatively, consider [Twig-View](https://github.com/slimphp/Twig-View).
1111

1212

13-
14-
## Templates
15-
You may use `$this` inside your php templates. `$this` will be the actual PhpRenderer object will allow you to render sub-templates
16-
1713
## Installation
1814

1915
Install with [Composer](http://getcomposer.org):
@@ -49,7 +45,6 @@ $response = $phpView->render(new Response(), "hello.php", $yourData);
4945
```
5046

5147
## Template Variables
52-
5348
You can now add variables to your renderer that will be available to all templates you render.
5449

5550
```php
@@ -81,6 +76,9 @@ $phpView->render($response, $template, [
8176
// In the view above, the $title will be "My Title" and not "Title"
8277
```
8378

79+
## Sub-templates
80+
Inside your templates you may use `$this` to refer to the PhpRenderer object to render sub-templates.
81+
8482
## Rendering in Layouts
8583
You can now render view in another views called layouts, this allows you to compose modular view templates
8684
and help keep your views DRY.

0 commit comments

Comments
 (0)