# ecom: core/tools/Output.php Source File

All Data Structures Namespaces Files Functions Variables
Output.php
Go to the documentation of this file.
<?php
namespace Tools;
function _global_include_($filename, $vars)
{
extract($vars, EXTR_OVERWRITE);
@include($filename);
}
class Output
{
private $context;
private $output_filtering;
public function __construct($context)
{
$this->output_filtering = true;
$this->context = $context;
}
public function renderFile($filePath)
{
_global_include_($filePath, array(
"controller" => $this->context->controller,
"context" => $this->context,
"cart" => $this->context->cart,
"user" => $this->context->user));
$content = ob_get_contents();
ob_end_clean();
$this->filter_content($content);
}
public function filter_content($content)
{
//TODO trigger hook
echo $content;
}
}
Tools\Output\$output_filtering
$output_filtering
Definition: Output.php:14
Tools\Output\filter_content
filter_content($content)
Definition: Output.php:34
Tools\Output\__construct
__construct($context)
Definition: Output.php:16
Tools\_global_include_
_global_include_($filename, $vars)
Definition: Output.php:5
Tools\Output\$context
$context
Definition: Output.php:13
Tools\Output\renderFile
renderFile($filePath)
Definition: Output.php:22
Tools
Definition: AController.php:3
Tools\Output
Definition: Output.php:11