Download the PHP package mbaynton/csv4twig without Composer
On this page you can find all versions of the php package mbaynton/csv4twig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mbaynton/csv4twig
More information about mbaynton/csv4twig
Files in mbaynton/csv4twig
Download mbaynton/csv4twig
More information about mbaynton/csv4twig
Files in mbaynton/csv4twig
Vendor mbaynton
Package csv4twig
Short Description A CSV escaping filter for the Twig templating engine.
License MIT
Package csv4twig
Short Description A CSV escaping filter for the Twig templating engine.
License MIT
Please rate this library. Is it a good library?
Informations about the package csv4twig
CSV4Twig
CSV escaping filter for the Twig templating engine
CSV4Twig enables Twig templates to generate safe, properly-escaped CSV output. It's useful when you need to get CSV reports out of an existing application that has a Twig-enabled output layer.
Usage
- Add it to your project with composer:
composer require mbaynton/csv4twig:1.0.*
- Tell Twig about it. You'll need to get a hold of the
\Twig_Environment
instance that will generate the CSV; then just pass it to\mbaynton\CSV4Twig\Filter::registerFilters()
. -
Use it in your template with the autoescape tag:
The contents of
some_value
andanother_value
will be escaped using the default CSV-escaping conventions of PHP'sfputcsv()
function.fputcsv()
is the function this filter uses internally.If you prefer, you can also escape certain values explicitly:
That's it!
All versions of csv4twig with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package mbaynton/csv4twig contains the following files
Loading the files please wait ....