https://github.com/ldrahnik/view-keeper
Keeper of app views.
https://github.com/ldrahnik/view-keeper
nette package php
Last synced: 2 months ago
JSON representation
Keeper of app views.
- Host: GitHub
- URL: https://github.com/ldrahnik/view-keeper
- Owner: ldrahnik
- License: other
- Created: 2015-01-31T19:06:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-17T20:29:25.000Z (almost 9 years ago)
- Last Synced: 2025-06-22T05:35:57.507Z (about 1 year ago)
- Topics: nette, package, php
- Language: PHP
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ldrahnik/view-keeper
======
[](https://travis-ci.org/ldrahnik/view-keeper)
[](https://packagist.org/packages/ldrahnik/view-keeper)
[](https://packagist.org/packages/ldrahnik/view-keeper)
Keeper of app views.
Benefits
-------
- View-keeper is easy way to separate files from logic (e.g. separate to repositories, it has benefits, rights etc.)
- Change location of files is now easier than ever before
Reference
-------
- [Anee - track manager for sharing tracks and photos](https://github.com/anee/anee)
- [TodoMVC - example nette project](https://github.com/ldrahnik/nette-todomvc)
Requirements
------------
ldrahnik/view-keeper requires PHP 5.4 or higher.
- [Nette Framework](https://github.com/nette/nette)
- [url-matcher](https://github.com/ldrahnik/url-matcher)
Installation
------------
Install keeper to your project using [Composer](http://getcomposer.org/):
```sh
$ composer require ldrahnik/view-keeper
```
Usage
-----
Register extension in config file
```sh
extensions:
keeper: ViewKeeper\DI\ViewKeeperExtension
keeper:
controls: foo/controls//
files: foo//
```
Is able to set up path via these patterns
```sh
# Module
# Module<:Base>Presenter
# Presenter
#
# .latte
```
Suffix is not configurable (still you can change that as param of `getView` method) - always will be in the end over dot
And inject
```php
/** @var \ViewKeeper\ViewKeeper @inject */
private $keeper;
```
Summary
-------
View keeper tries to be ultra-light package and simple to use. You will love it :)
For more information about path enrolment please check [url-matcher](https://github.com/ldrahnik/url-matcher)