Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abandoned!

Latest Stable Version License Build Status

PHP simple view

Simple PHP view renderer.

Dependencies

  • PHP >= 5.6.0

Installation

Install with Composer:

composer require dtkahl/php-simple-view

Usage

anywhere in PHP

$renderer = new \Dtkahl\SimpleView\ViewRenderer(__DIR__.'/views/');
echo $render->render('example.php', ['name' => 'test']);

/views/example.php

<!DOCTYPE html>
<html>
  <head></head>
  <body><?php echo $name ?></body>
<html>

Methods

addViewPaths($paths)

add Path(s) where render should search for view files. Returns renderer instance.

####render(string $file, array $data = []) render given view file with given data (as local vars).

About

Abandoned

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages