https://github.com/g737a6b/php-r2-template
PHP template library.
https://github.com/g737a6b/php-r2-template
composer library php template
Last synced: 6 months ago
JSON representation
PHP template library.
- Host: GitHub
- URL: https://github.com/g737a6b/php-r2-template
- Owner: g737a6b
- License: mit
- Created: 2017-12-01T12:51:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T15:31:44.000Z (over 1 year ago)
- Last Synced: 2025-06-07T07:41:01.027Z (about 1 year ago)
- Topics: composer, library, php, template
- Language: PHP
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# R2Template 
PHP template library.
## Usage Examples
```php
$R2Template = new R2Template\R2Template("./templates");
$R2Template->set("var1", "foo");
$R2Template->set("var2", "bar");
$R2Template->display("echo_vars.php"); // foo bar
```
## Installation
### Composer
Add a dependency to your project's `composer.json` file.
```json
{
"require": {
"g737a6b/php-r2-template": "*"
}
}
```
## Development
### Install dependencies
```sh
docker run -it --rm -v $(pwd):/app composer:2.9.2 install
```
### Run tests
```sh
docker run -it --rm -v $(pwd):/app -w /app php:8.5 ./vendor/bin/phpunit ./tests
```
### Format code
```sh
docker run -it --rm -v $(pwd):/app -w /app php:8.3 ./vendor/bin/php-cs-fixer fix ./src
```
## License
[The MIT License](http://opensource.org/licenses/MIT)
Copyright (c) 2017-2026 [Hiroyuki Suzuki](https://mofg-in-progress.com)