https://github.com/shapecode/twig-string-loader-bundle
https://github.com/shapecode/twig-string-loader-bundle
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shapecode/twig-string-loader-bundle
- Owner: shapecode
- License: mit
- Created: 2016-06-06T08:59:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-02T15:30:26.000Z (over 2 years ago)
- Last Synced: 2025-03-23T19:39:07.729Z (about 1 year ago)
- Language: PHP
- Size: 41 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Shapecode - Twig String Loader Bundle
[](http://paypal.me/nloges)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
[](https://packagist.org/packages/shapecode/twig-string-loader-bundle)
## Install instructions
First you need to add `shapecode/twig-string-loader-bundle` to `composer.json`:
Do it by execute `composer require shapecode/twig-string-loader-bundle` or do it manually
``` json
{
"require": {
"shapecode/twig-string-loader-bundle": "^2.0"
}
}
```
You also have to add `ShapecodeTwigStringLoaderBundle` to your `AppKernel.php` ...
``` php
['all' => true],
];
```
## Usage
Now you can compile strings with twig:
``` php
get('twig')->render('Hello {{ world }}', array(
'world' => 'World'
));
```