Skip to content

Commit

Permalink
Merge pull request #39 from llvdl/textual-change
Browse files Browse the repository at this point in the history
textual change in README.md
  • Loading branch information
l0gicgate committed Apr 15, 2019
2 parents 8401136 + dbf7327 commit a13ada9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ This is a renderer for rendering PHP view scripts into a PSR-7 Response object.
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).



## Templates
You may use `$this` inside your php templates. `$this` will be the actual PhpRenderer object will allow you to render sub-templates

## Installation

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

## Template Variables

You can now add variables to your renderer that will be available to all templates you render.

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

## Sub-templates
Inside your templates you may use `$this` to refer to the PhpRenderer object to render sub-templates.

## Rendering in Layouts
You can now render view in another views called layouts, this allows you to compose modular view templates
and help keep your views DRY.
Expand Down

0 comments on commit a13ada9

Please sign in to comment.