Closed daycry closed 2 years ago
@daycry Thank you for your PR.
I think the API should be like this:
$template = $this->twig->createTemplate($template_string);
$this->twig->display($template, $data);
I don't accept the method name create()
or createTemplate()
in your PR. Because the name implies just to create a template, but it does render the template and set output, too.
The name of method would be getStringTemplate or similar.
I think that this is a good function for your twig library, because some templates are in database.
On Sep 17, 2017 11:14 AM, "kenjis" notifications@github.com wrote:
@daycry https://github.com/daycry Thank you for your PR.
I think the API should be like this:
$template = $this->twig->createTemplate($template_string);$this->twig->display($template, $data);
I don't accept the method name create() or createTemplate() in your PR. Because the name implies just to create a template, but it does render the template and set output, too.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kenjis/codeigniter-ss-twig/pull/29#issuecomment-330031288, or mute the thread https://github.com/notifications/unsubscribe-auth/AHPRv6CsTr8WfyRo9gGrHT8-1VVHzwaMks5sjOLkgaJpZM4NAGsC .
Sorry, I have no plan to add functionality to v1.x (master branch).
For example:
on
$params->campaign->template_subscription
is a twig template in database