@param string $view

@return bool
499793
public function has(string $view): bool
    {
        $path      = $this->get($view);
        $real      = $this->flow->native()->path($view . $this->flow->ext());
        $directory = \dirname($path);

        if (empty($this->paths[$view]) && ($this->flow->debugMode() || !File::exists($path)))
        {
            Dir::make($directory);

            return false;
        }

        return \filemtime($path) > \filemtime($real);
    }
468842
protected function registerViewEvent(string $view)
    {
        if ($this->has($view)) {
            $class = $this->get($view);

            if (is_callable($class)) {
                return $class($this);
            }

            $this->viewShared = $this->container()->make($class);

            if (!method_exists($this->viewShared, 'creating')) {
                throw new ViewEventNotFoundException("Event not resgistered for the view $view.");
            }
            $this->viewShared->creating($this);
        }
    }
810526
function viewResult( $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        if ( isset( $this->ViewResult[$view] ) )
        {
            return $this->ViewResult[$view];
        }
        return null;
    }
350535
protected function parseView($view)
	{
		if (is_string($view)) return [$view, null, null];

		// If the given view is an array with numeric keys, we will just assume that
		// both a "pretty" and "plain" view were provided, so we will return this
		// array as is, since must should contain both views with numeric keys.
		if (is_array($view) && isset($view[0]))
		{
			return [$view[0], $view[1], null];
		}

		// If the view is an array, but doesn't contain numeric keys, we will assume
		// the the views are being explicitly specified and will extract them via
		// named keys instead, allowing the developers to use one or the other.
		elseif (is_array($view))
		{
			return [
				array_get($view, 'html'),
				array_get($view, 'text'),
				array_get($view, 'raw'),
			];
		}

		throw new InvalidArgumentException("Invalid view.");
	}
737985
public function getViewPath($view)
    {
        if ($view instanceof View) {
            return $view->getPath();
        }

        if (strpos($view, '::') !== false) {
            return $view;
        }

        return $this->getViewNamespace().'.'.$view;
    }
7330
public function setView($view, $variables = [])
    {
        if (!empty($variables)) {
            $this->with($variables);
        }

        $this->view = $view;
    }
1113027
private function compile_phptag( $view )
	{
		// I hate this workaround
		$that = $this;

		return preg_replace_callback('/\{\%(.*?)\%\}/s', function( $match ) use( $that )
		{ 
			$expression = trim( $match[1] );

			// repair it 
			$expression = $that->repair_expression( $expression );

			return '<?php '.$expression.' ?>'; 
		}, $view );
	}
1013373
public function render(View $view = null)
    {

        if ($this->rendered) {
            return true;
        }

        //$this->reloadResponseVars( $this->response );

        $onRender = new Event('Controller.beforeRender', $this);

        $this->observer->trigger($onRender);
        if ($onRender->isStopped()) {
            $this->autoRender = false;

            return $this->response;
        }

        //controllers only know about one view.
        //Every action uses a single view;
        //views can be set with $this->setView("") or $this->display(""); //or can be set on render;

        //If we are setting a really late view;
        $view = !is_null($view) ? $view : $this->getView();

        $this->response->addContent($view->render());

        $this->rendered = true;

        return true;
    }
824897
public function isOnView($view)
    {
        $view = ucfirst(strtolower($view));

        if (in_array($view, ['Form', 'Index', 'Show'])) {
            return $this->{'isOn' . $view . 'View'};
        }

        return false;
    }
291133
public function setView($view)
    {
        if(!($view instanceof KViewInterface))
        {
            if(is_string($view) && strpos($view, '.') === false )
            {
                $identifier			= $this->getIdentifier()->toArray();
                $identifier['path']	= array('view', $view);
                $identifier['name']	= $this->getRequest()->getFormat();

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($view);

            $view = $identifier;
        }

        $this->_view = $view;

        return $this->_view;
    }
814578
function hasActionParameter( $parameterName, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        if ( isset( $this->ViewActionParameters[$view][$parameterName] ) )
            return true;
        $currentAction = $this->currentAction( $view );
        $http = eZHTTPTool::instance();
        if ( isset( $this->Functions[$view]['post_action_parameters'][$currentAction] ) )
        {
            $postParameters = $this->Functions[$view]['post_action_parameters'][$currentAction];
            if ( isset( $postParameters[$parameterName] ) and
                 $http->hasPostVariable( $postParameters[$parameterName] ) )
            {
                return true;
            }
        }
        if ( isset( $this->Functions[$view]['post_value_action_parameters'][$currentAction] ) )
        {
            $postParameters = $this->Functions[$view]['post_value_action_parameters'][$currentAction];
            if ( isset( $postParameters[$parameterName] ) )
            {
                $postVariables = $http->attribute( 'post' );
                $postVariableNameMatch = $postParameters[$parameterName];
                $regMatch = "/^" . $postVariableNameMatch . "_(.+)$/";
                foreach ( $postVariables as $postVariableName => $postVariableValue )
                {
                    if ( preg_match( $regMatch, $postVariableName, $matches ) )
                    {
                        $parameterValue = $matches[1];
                        $this->ViewActionParameters[$view][$parameterName] = $parameterValue;
                        return true;
                    }
                }
            }
        }
        return false;
    }
256131
public function convertView($view)
    {
        if (strpos($view, '@') !== false || strpos($view, '/') !== false || strpos($view, '\\') !== false) {
            return $view;
        }
        return strtolower(substr(static::className(), strrpos(static::className(), '\\') + 1)) . '-' . $view;
    }
157818
protected function viewExistsOrFail($view, $message = 'The view [:view] not found')
    {
        if ( ! $this->isViewExists($view)) {
            abort(500, str_replace(':view', $view, $message));
        }
    }
195955
public function compose(View $view)
    {
        $status = $this->system->getStatus();

        $view->withSystemStatus(Arr::get($status, 'system_status'));
        $view->withSystemMessage(Arr::get($status, 'system_message'));
    }
812602
public function isTemplateOf(self $view)
    {
        while ($_view = $view->getTemplate()) {
            if ($this === $_view) {
                return true;
            }
            $view = $_view;
        }

        return false;
    }
193421
public static function exists($view)
    {
        $path = INPHINIT_PATH . 'application/View/' . strtr($view, '.', '/') . '.php';
        return is_file($path) && \UtilsCaseSensitivePath($path);
    }
873500
public function compareViews(View $oldView, View $newView)
    {
        return ($oldView->getName() !== $newView->getName()) || ($oldView->getSQL() !== $newView->getSQL());
    }