ecom
E-commerce cms
 All Data Structures Namespaces Files Functions Variables
Output.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Tools;
4 
5 function _global_include_($filename, $vars)
6 {
7  extract($vars, EXTR_OVERWRITE);
8  @include($filename);
9 }
10 
11 class Output
12 {
13  private $context;
15 
16  public function __construct($context)
17  {
18  $this->output_filtering = true;
19  $this->context = $context;
20  }
21 
22  public function renderFile($filePath)
23  {
24  _global_include_($filePath, array(
25  "controller" => $this->context->controller,
26  "context" => $this->context,
27  "cart" => $this->context->cart,
28  "user" => $this->context->user));
29  $content = ob_get_contents();
30  ob_end_clean();
31  $this->filter_content($content);
32  }
33 
34  public function filter_content($content)
35  {
36  //TODO trigger hook
37  echo $content;
38  }
39 }
40 
$output_filtering
Definition: Output.php:14
filter_content($content)
Definition: Output.php:34
__construct($context)
Definition: Output.php:16
_global_include_($filename, $vars)
Definition: Output.php:5
renderFile($filePath)
Definition: Output.php:22