Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape is not batchable #96

Closed
pascal-hofmann opened this issue Sep 11, 2015 · 5 comments
Closed

escape is not batchable #96

pascal-hofmann opened this issue Sep 11, 2015 · 5 comments

Comments

@pascal-hofmann
Copy link

escape is not batchable since it has been moved from a default extension to the Template class. So the example:

<p>Welcome <?=$this->batch($name, 'strip_tags|strtoupper|escape')?></p>

on http://platesphp.com/templates/functions/ does not work. I get a LogicException:

The batch function could not find the "escape" function.

Background: I want to do

$this->batch($str, 'escape|nl2br')
@ricardofiorani
Copy link
Contributor

@phofmann-trust what PHP version are you using ?

@pascal-hofmann
Copy link
Author

I was using PHP 5.5 at that time.

Edit: I just tried again with PHP 5.6.18. I still get the same error.

@ragboyjr
Copy link
Contributor

@pascal-hofmann have you tried

$this->escape($str, 'nl2br|strtoupper');

This should batch those two funcs first, then escape the string.

@ragboyjr
Copy link
Contributor

@pascal-hofmann does this resolve your issue?

@reinink
Copy link
Contributor

reinink commented Dec 27, 2016

This issue was happening because the template methods were not public. This has now been fixed! See 3688ad5.

@reinink reinink closed this as completed Dec 27, 2016
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

No branches or pull requests

4 participants