aboutsummaryrefslogtreecommitdiff
path: root/vendor/flexi/examples/04_handler_plugin
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /vendor/flexi/examples/04_handler_plugin
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'vendor/flexi/examples/04_handler_plugin')
-rw-r--r--vendor/flexi/examples/04_handler_plugin/mustache.php32
-rw-r--r--vendor/flexi/examples/04_handler_plugin/templates/layout.php3
-rw-r--r--vendor/flexi/examples/04_handler_plugin/templates/mustache.mustache5
3 files changed, 0 insertions, 40 deletions
diff --git a/vendor/flexi/examples/04_handler_plugin/mustache.php b/vendor/flexi/examples/04_handler_plugin/mustache.php
deleted file mode 100644
index 604c994..0000000
--- a/vendor/flexi/examples/04_handler_plugin/mustache.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-error_reporting(E_ALL ^ E_NOTICE);
-
-// load flexi lib
-require_once dirname(__FILE__) . '/../../lib/flexi.php';
-
-// where are the templates
-$path_to_the_templates = dirname(__FILE__) . '/templates';
-
-// we need a template factory
-$factory = new Flexi_TemplateFactory($path_to_the_templates);
-
-// load haml plugin
-
-require_once dirname(__FILE__) . '/../../lib/mustache_template.php';
-$factory->add_handler('mustache', 'Flexi_MustacheTemplate');
-
-// open template
-$template = $factory->open('mustache');
-
-$template->set_attributes(array(
- "name" => "Chris",
- "value" => 10000,
- "taxed_value" => 10000 - (10000 * 0.4),
- "in_ca" => true
-));
-
-// test mix of different template engines
-$template->set_layout("layout");
-
-// render template
-echo $template->render();
diff --git a/vendor/flexi/examples/04_handler_plugin/templates/layout.php b/vendor/flexi/examples/04_handler_plugin/templates/layout.php
deleted file mode 100644
index 60d102c..0000000
--- a/vendor/flexi/examples/04_handler_plugin/templates/layout.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<layout>
-<?= $content_for_layout ?>
-</layout>
diff --git a/vendor/flexi/examples/04_handler_plugin/templates/mustache.mustache b/vendor/flexi/examples/04_handler_plugin/templates/mustache.mustache
deleted file mode 100644
index de4a2be..0000000
--- a/vendor/flexi/examples/04_handler_plugin/templates/mustache.mustache
+++ /dev/null
@@ -1,5 +0,0 @@
-Hello {{name}}
-You have just won ${{value}}!
-{{#in_ca}}
-Well, ${{taxed_value}}, after taxes.
-{{/in_ca}}