Skip to content

Fixes and updates to doT.php#4

Open
nzn1 wants to merge 7 commits intoseblucas:masterfrom
nzn1:master
Open

Fixes and updates to doT.php#4
nzn1 wants to merge 7 commits intoseblucas:masterfrom
nzn1:master

Conversation

@nzn1
Copy link

@nzn1 nzn1 commented Apr 19, 2023

PHP8 compatibility
Configurable template function argument variable name
Allow UTF-8 and single-quotes in templates
Default value of NULL for $def method argument (not required for basic templating)
Minor cleanup of unused code

nzn1 added 7 commits April 19, 2023 22:35
Fixed for PHP8 (used eval + lambda for creating the return function - needed eval for the argName feature)
Added the option to set the argName as in the original doT.js by setting the public property "argName" to something like '$myvar'
Fix UTF-8 characters breaking templates.
Give default value to $def argument of template method
Remove unused $functionCode property and execute method
Corrected the preg_replace for handling single-quotes and slashes in templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant