Download the PHP package crecket/custom-twig-extension without Composer
On this page you can find all versions of the php package crecket/custom-twig-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download crecket/custom-twig-extension
More information about crecket/custom-twig-extension
Files in crecket/custom-twig-extension
Download crecket/custom-twig-extension
More information about crecket/custom-twig-extension
Files in crecket/custom-twig-extension
Vendor crecket
Package custom-twig-extension
Short Description My custom twig extension
License WTFPL
Homepage https://github.com/Crecket/custom-twig-extension
Package custom-twig-extension
Short Description My custom twig extension
License WTFPL
Homepage https://github.com/Crecket/custom-twig-extension
Please rate this library. Is it a good library?
Informations about the package custom-twig-extension
custom-twig-extension
Content
- Introduction
- Requirements
- Installation
- Usage
- License
Introduction
This repo contains my custom twig extension. In here you'll find a few native php functions added to twig as a twig extension. Things like creating a random number or using json_decode can now be done directly in Twig.
Requirements
- Twig ^1.25
Installation
Composer
-
Require the repo with composer
- Add the extension to the twig view (custom_twig_extension is the class)
Manual
- Download the source
- Require the file
- Add the extension to the twig view
Usage
Using these functions and filters is the same as the native functions and filters.
Quick example:
-
print_r()
- json_decode
List
Functions
- dumpPre(var1, var2, var3 ...)
- md5(password)
- password_hash(password)
- phpinfo()
- print_r(array)
- pseudoBytes(length)
- randomHex(length)
- randomInt(length)
- randomString(length)
- unsetSession(key)
- wordwrap(string, length, limiter = "\n", cut)
Filters
- json_decode
- urlDecode
Globals
- sessionVars //Returns all php SESSION variables in array form
All versions of custom-twig-extension with dependencies
PHP Build Version
Package Version
Requires
twig/twig Version
^1.23
The package crecket/custom-twig-extension contains the following files
Loading the files please wait ....