public function __construct($file, $data = array()) { self::checkData($data); $this->file = $file; $this->data = $data; $doctypeConstant = ipConfig()->get('defaultDoctype'); $this->doctype = constant('\\Ip\\Response\\Layout::' . $doctypeConstant); }