From 104a1d7fd302bc4d10a5da4f17528ecbcecf66a7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 19 Nov 2017 10:22:18 -0500 Subject: [PATCH] Move ITemplateEngine to src - Fix method name format --- include/friendica_smarty.php | 9 +++++---- include/text.php | 4 ++-- object/TemplateEngine.php | 15 --------------- src/App.php | 2 +- src/Render/ITemplateEngine.php | 15 +++++++++++++++ 5 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 object/TemplateEngine.php create mode 100644 src/Render/ITemplateEngine.php diff --git a/include/friendica_smarty.php b/include/friendica_smarty.php index f497fbee01..5dd324bf75 100644 --- a/include/friendica_smarty.php +++ b/include/friendica_smarty.php @@ -1,6 +1,7 @@ parsed($template); } - public function get_template_file($file, $root=''){ + public function getTemplateFile($file, $root=''){ $a = get_app(); $template_file = get_template_file($a, SMARTY3_TEMPLATE_FOLDER.'/'.$file, $root); $template = new FriendicaSmarty(); diff --git a/include/text.php b/include/text.php index cf802513c4..616c4adb86 100644 --- a/include/text.php +++ b/include/text.php @@ -30,7 +30,7 @@ function replace_macros($s, $r) { $t = $a->template_engine(); try { - $output = $t->replace_macros($s, $r); + $output = $t->replaceMacros($s, $r); } catch (Exception $e) { echo "
" . __FUNCTION__ . ": " . $e->getMessage() . "
"; killme(); @@ -591,7 +591,7 @@ function get_markup_template($s, $root = '') { $a = get_app(); $t = $a->template_engine(); try { - $template = $t->get_template_file($s, $root); + $template = $t->getTemplateFile($s, $root); } catch (Exception $e) { echo "
" . __FUNCTION__ . ": " . $e->getMessage() . "
"; killme(); diff --git a/object/TemplateEngine.php b/object/TemplateEngine.php deleted file mode 100644 index 61ccb01dcf..0000000000 --- a/object/TemplateEngine.php +++ /dev/null @@ -1,15 +0,0 @@ -register_template_engine($k); } } diff --git a/src/Render/ITemplateEngine.php b/src/Render/ITemplateEngine.php new file mode 100644 index 0000000000..d592481192 --- /dev/null +++ b/src/Render/ITemplateEngine.php @@ -0,0 +1,15 @@ +