1<?php
2
3#################################################################
4#  Copyright notice
5#
6#  (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
7#  All rights reserved
8#
9#  http://flake.codr.fr
10#
11#  This script is part of the Flake project. The Flake
12#  project is free software; you can redistribute it
13#  and/or modify it under the terms of the GNU General Public
14#  License as published by the Free Software Foundation; either
15#  version 2 of the License, or (at your option) any later version.
16#
17#  The GNU General Public License can be found at
18#  http://www.gnu.org/copyleft/gpl.html.
19#
20#  This script is distributed in the hope that it will be useful,
21#  but WITHOUT ANY WARRANTY; without even the implied warranty of
22#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23#  GNU General Public License for more details.
24#
25#  This copyright notice MUST APPEAR in all copies of the script!
26#################################################################
27
28namespace Flake\Controller;
29
30class HtmlBlockTemplated extends \Flake\Core\Controller {
31    /**
32     * @var string
33     */
34    private $sTemplatePath;
35
36    /**
37     * @var array
38     */
39    private $aMarkers;
40
41    function __construct($sTemplatePath, $aMarkers = []) {
42        $this->sTemplatePath = $sTemplatePath;
43        $this->aMarkers = $aMarkers;
44    }
45
46    function render() {
47        $oTemplate = new \Flake\Core\Template($this->sTemplatePath);
48        $sHtml = $oTemplate->parse(
49            $this->aMarkers
50        );
51
52        return $sHtml;
53    }
54
55    function execute() {
56        // TODO: Implement execute() method.
57    }
58}
59