_engine = Mustache::instance()->get_engine(); } final public function render($path) { $path = AMOFORMS_VIEWS_DIR . '/' . $path . '.php'; if (!file_exists($path)) { throw new Runtime('File for view not found in path: ' . $path); } /** @noinspection PhpIncludeInspection */ require $path; } final public function get_content($path) { ob_start(); $this->render($path); $content = ob_get_contents(); ob_end_clean(); return $content; } final public function set($key, $value) { $this->_data[$key] = $value; return $this; } final public function get($key) { return isset($this->_data[$key]) ? $this->_data[$key] : FALSE; } final public function engine() { return $this->_engine; } }