public final function render() { if (!$this->controller) { $this->set_controller(); } $return = moojon_runner::render(moojon_paths::get_view_path(self::get_app_name($this), self::get_controller_name($this->controller), $this->controller->get_view()), $this->controller, $this->uri); $layout = $this->get_layout(); if ($layout !== false) { $return = str_replace('YIELD', $return, moojon_runner::render(moojon_paths::get_layout_path($layout), $this->controller), $this->uri); } return $return; }