Requires the view in its own scope with etracted variables and returns
the buffered output.

@return string
971198
public function requireView()
    {
        if (! $this->view) {
            return '';
        }

        extract($this->vars);
        ob_start();
        require $this->getViewPath();
        return ob_get_clean();
    }
803981
public function view()
		{
		    // default variables
            $finder         = new Finder();
            $finder->start();

            // config
            $config         = app(SketchpadConfig::class);

            // base name
            $basePath       = Paths::fix(base_path('/'));
            $baseSegments   = explode('/', rtrim($basePath, '/'));
            $baseName       = array_pop($baseSegments) . '/';

            // view path
            $viewPaths      = Config::get('view.paths');
            $viewPath       = substr(Paths::fix($viewPaths[0]), strlen($basePath));

			// variables
			$app            = app();
			$data =
			[
				'route'     => $config->route,
				'assets'    => $config->route . 'assets/',
				'settings' =>
				[
					'route'             => $config->route,
					'basepath'          => $basePath,
					'basename'          => $baseName,
                    'viewpath'          => $viewPath,
                    'storagepath'       => Paths::relative($config->settings->src),
                    'controllerpath'    => trim(Paths::relative($finder->path), '/'),
					'namespace'         => method_exists($app, 'getNamespace')
                                            ? trim($app->getNamespace(), '\\')
                                            : 'App\\',
                    'namespaces'        => (new JSON('composer.json'))->get('autoload.psr-4')
				]
			];

			// return view
			return view('sketchpad::setup', $data);
		}
196019
public function getView()
    {
        if (is_null($this->_view)) {
            $controller = $this->_routeInfo->controllerName;
            $name = $this->_routeInfo->action;
            $ext = $this->_routeInfo->getExtension();
            $template = "{$controller}/{$name}.{$ext}.twig";
            if (!is_null($this->_controller->view)) {
                $template = "{$this->_controller->view}.{$ext}.twig";
            }
            $this->_view = new View(['file' => $template]);
        }
        return $this->_view;
    }
525607
public function getBufferedContents(): string {
	    if ($this->jhtmlJsonPayload === null) {
	        return $this->htmlView->getBufferedContents();
	    }
	    
	    return $this->jhtmlJsonPayload->getBufferedContents();
	}
739791
public function getScope() {
		$calledHere = $this->backTrace[$this->backTraceOffset+1];

		if (isset($calledHere['class'])) {
			return (object) array(
				'type' => 'Method',
				'name' => $calledHere['class'].$calledHere['type'].$calledHere['function']
			);
		} elseif(isset($calledHere['function'])) {
			return (object) array(
				'type' => 'Function',
				'name' => $calledHere['function']
			);
		} else {
			return (object) array(
				'type' => 'global'
			);
		}
	}
64322
public function getView()
    {
        if (!empty($this->view)) {
            return $this->view;
        }

        $class = explode('\\', get_called_class());

        return 'merchant::form.'.strtolower(end($class));
    }
1247257
public function output_html() {
        $adminroot = admin_get_root();
        $return = '<fieldset>'."\n".'<div class="clearer"><!-- --></div>'."\n";
        foreach($this->settings as $setting) {
            $fullname = $setting->get_full_name();
            if (array_key_exists($fullname, $adminroot->errors)) {
                $data = $adminroot->errors[$fullname]->data;
            } else {
                $data = $setting->get_setting();
                // do not use defaults if settings not available - upgrade settings handles the defaults!
            }
            $return .= $setting->output_html($data);
        }
        $return .= '</fieldset>';
        return $return;
    }
25022
public function getView()
    {
        if (!$this->_view) {

            $defaultViewsDir = $this->getDI()->get('view')->getViewsDir() . '/' . static::VIEW_DIR_NAME . '/';

            $this->_view = new ViewSimple();
            $this->_view->setViewsDir($this->getOptions('viewsDir', $defaultViewsDir));
        }

        return $this->_view;
    }
972167
public function getOutput(): string
    {
        $this->prepareFlush();
        $path = $this->getViewPath($this->view);

        if (!file_exists($path)) {
            throw new ResponseException("View ({$this->view}) not found on path={$path}");
        }

        ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE);

        require $path;

        return ob_get_clean();
    }
1274571
protected function getView()
    {
        if ($this->view) {
            return $this->view;
        } else {

            /** @var $viewApp \Phalcon\Mvc\View */
            $viewApp = $this->getDI()->get('view');

            if (!($viewsDir = $this->getConfig('viewsDir'))) {
                $viewsDir = $viewApp->getViewsDir();
            }

            /** @var $view \Phalcon\Mvc\View\Simple */
            $view = $this->getDI()->get('\Phalcon\Mvc\View\Simple');
            $view->setViewsDir($viewsDir);

            if ($engines = $viewApp->getRegisteredEngines()) {
                $view->registerEngines($engines);
            }

            return $this->view = $view;
        }
    }
894350
public function render()
    {
        if (! $this->display) {
            return;
        }

        $this->runBeforeRender();
        $this->checkRequired();
        $this->translate();

        $attributes = $this->getModifyAttributes();
        $this->attributes['id'] = $this->getId();

        if ($this->hasError()) {
            if (! isset($attributes['class']) || is_null($attributes['class'])) {
                $attributes['class'] = ' is-invalid';
            } else {
                $attributes['class'] .= ' is-invalid';
            }
        }

        return view($this->view, array_merge($this->getAttributes(), [
            'attributes' => $attributes,
            'id'         => $this->getId(),
            'old'        => $this->getOldValue(),
            'slug'       => $this->getSlug(),
            'oldName'    => $this->getOldName(),
            'typeForm'   => $this->typeForm ?? $this->vertical()->typeForm,
        ]))
            ->withErrors(session()->get('errors', app(ViewErrorBag::class)));
    }
25810
public function display()
    {
        $this->output = '';
        $output = $this->load($this->_layout);
        $this->output = $this->output.$output;

        return $this->output;
    }
689006
public function view()
    {
        ob_start();
        $form = $this;
        require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'form.php';
        $html = ob_get_clean();
        return $html;
    }
168038
public function getView()
    {
        $controller = $this->getActionController();
        if (null === $controller) {
            $controller = $this->getFrontController();
        }

        return $controller->view;
    }
1342524
public function render(): string
   {
       try {
           $output = "";
           foreach ($this->observer as $value) {
               $output .= $value->render();
           }
           return $output;
       } catch (Throwable $e) {
           throw new ViewException(
               "Can't render " . static::class . " " . $e->getMessage()
           );
       }
   }
621541
protected function _getView()
	{
		if ($viewInstance = Registry::get('view')) {
			return $viewInstance;
		}

		$request = Agl::getRequest();
		$module  = $request->getModule();
		$view    = $request->getView();

		$viewPath = APP_PATH
                    . Agl::APP_PHP_DIR
                    . ViewInterface::APP_PHP_DIR
                    . DS
                    . $module
                    . DS
                    . $view
                    . Agl::PHP_EXT;

        if (file_exists($viewPath)) {
            $className    = $module . ucfirst($view) . ViewInterface::APP_VIEW_SUFFIX;
            $viewInstance = Agl::getInstance($className);
        } else {
            $viewInstance = new View();
        }

        $viewInstance->setFile($module . DS . $view);

        Registry::set('view', $viewInstance);

        return $viewInstance;
	}
1213819
public function get()
	{
		$__data = $this->data();

		// The contents of each view file is cached in an array for the
		// request since partial views may be rendered inside of for
		// loops which could incur performance penalties.
		$__contents = $this->load();

		ob_start() and extract($__data, EXTR_SKIP);

		// We'll include the view contents for parsing within a catcher
		// so we can avoid any WSOD errors. If an exception occurs we
		// will throw it out to the exception handler.
		try
		{
			eval('?>'.$__contents);
		}

		// If we caught an exception, we'll silently flush the output
		// buffer so that no partially rendered views get thrown out
		// to the client and confuse the user with junk.
		catch (\Exception $e)
		{
			ob_get_clean(); throw $e;
		}

		$content = ob_get_clean();

		// The view filter event gives us a last chance to modify the
		// evaluated contents of the view and return them. This lets
		// us do something like run the contents through Jade, etc.
		if (Event::listeners('view.filter'))
		{
			return Event::first('view.filter', array($content, $this->path));
		}

		return $content;
	}