Add the ability to transform from one case style to another programatically.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2021-05-16 05:52:56 +02:00
.github/workflows Fix github actions? 2021-05-16 05:28:11 +02:00
tests Fix unit tests + update to PHPUnit 9 2021-05-16 05:15:38 +02:00
.gitignore Fix unit tests + update to PHPUnit 9 2021-05-16 05:15:38 +02:00
CODE_OF_CONDUCT.md Change Namespace. 2021-05-16 04:44:43 +02:00
composer.json Fix unit tests + update to PHPUnit 9 2021-05-16 05:15:38 +02:00
LICENSE.md Change Namespace. 2021-05-16 04:44:43 +02:00
phpunit.xml.dist autoloading? 2021-05-16 05:33:31 +02:00
README.md Change Namespace. 2021-05-16 04:39:51 +02:00
TransformExtension.php Fix unit tests + update to PHPUnit 9 2021-05-16 05:15:38 +02:00
TransformExtensionException.php Change Namespace. 2021-05-16 04:39:51 +02:00

Twig-Transform

Build Status

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