plates icon indicating copy to clipboard operation
plates copied to clipboard

Classic escapers as loadable (loaded by default) extension

Open pine3ree opened this issue 2 years ago • 1 comments

  1. Provides a better solution than https://github.com/thephpleague/plates/pull/312
  2. Allows developer to use the e and escape helper function names for custom functions with different signatures (classic escape functions can be dropped, but also not loaded by default at all using a new engine constructor flag)
  3. Extends the escape method in a retro-compatible way to allow for more customization

pine3ree avatar Jun 13 '23 16:06 pine3ree

A note/reminder for https://github.com/thephpleague/plates/pull/314/commits/e418761cc8033d7afdd4beda6e1f332a3ee4d0d5 Maybe throwing a logic exception would be better if the $template property is not assigned. Template functions are meant to be called inside templates anyway.

pine3ree avatar Jun 13 '23 17:06 pine3ree