diff --git a/README.md b/README.md index 5d1a3e4..27136b9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a renderer for rendering PHP view scripts into a PSR-7 Response object. It works well with Slim Framework 3. -## Usage +## Usage With Slim 3 ```php use Slim\Views\PhpRenderer; @@ -20,6 +20,15 @@ $app->get('/hello/{name}', function ($request, $response, $args) { $app->run(); ``` +## Usage with any PSR-7 Project +```php +//Construct the View +$phpView = new PhpRenderer("./path/to/templates"); + +//Render a Template +$response = $phpView->render(new Response(), "/path/to/template.php", $yourData); +``` + ## Exceptions `\RuntimeException` - if template does not exist