An open API service indexing awesome lists of open source software.

https://github.com/morphable/simpleview


https://github.com/morphable/simpleview

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# Simple view component
A simple view component, easy to implement into any system

## Usage

```php
serve("home.php", [
"title" => "hello world",
"helper" => new Helper()
]);

/*
* /views/home.php
*/

$data = $this->getData();
$helper = $data['helper'];
?>

= $this->include('components/header.php') ?>

if (isset($data['title'])): ?>

= $helper->translate($data['title'], 'NL') ?>

endif; ?>

= $this->include('components/footer.php') ?>
```

## Contributing
- Follow PSR-2 and the .editorconfig
- Start namespaces with \Morphable\SimpleView
- Make tests