public static function getController($class_name, $auth = false, $ssl = false)
{
return new $class_name($auth, $ssl);
}
public function __construct()
{
if (is_null($this->display_header)) {
$this->display_header = true;
}
if (is_null($this->display_header_javascript)) {
$this->display_header_javascript = true;
}
if (is_null($this->display_footer)) {
$this->display_footer = true;
}
$this->context = Context::getContext();
$this->context->controller = $this;
// Usage of ajax parameter is deprecated
$this->ajax = Tools::getValue('ajax') || Tools::isSubmit('ajax');
if (!headers_sent()
&& isset($_SERVER['HTTP_USER_AGENT'])
&& (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false)) {
header('X-UA-Compatible: IE=edge,chrome=1');
}
}