matthewbaggett / twig-extension-transform
Add the ability to transform from one case style to another programatically.
Installs: 606
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/matthewbaggett/twig-extension-transform
Requires
- php: ^7.4 || ^8.0
- mattketmo/camel: ^1.1.0
- twig/twig: ^3.0
Requires (Dev)
- kint-php/kint: ^2.1
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2025-09-16 13:22:50 UTC
README
Add the ability to transform from one case style to another programatically.
Example:
{{ input|transform_camel_to_snake }}
will output this_is_an_example
for the input thisIsAnExample
###Supported transformers:
Any combination of the following:
- Camel
thisIsAnExample
- Snake
this_is_an_example
- Screaming Snake
THIS_IS_AN_EXAMPLE
- Spinal
this-is-an-example
- Studly Caps
ThisIsAnExample
using the format 'transform-from
-to-target
'
Credits
Written ontop of the wonderful Camel package written by Matthieu Moquet