src/mako/view/ViewFactory.php
public function create(string $view, array $variables = []): View
	{
		[$path, $extension] = $this->getViewPathAndExtension($view);

		return new View($path, $this->mergeVariables($view, $variables), $this->resolveRenderer($extension));
	}
public function create(string $view, array $variables = []): View
	{
		[$path, $extension] = $this->getViewPathAndExtension($view);

		return new View($path, $this->mergeVariables($view, $variables), $this->resolveRenderer($extension));
	}
public function create ( string $ view , array $ variables = [ ] ) : View { [ $ path , $ extension ] = $ this -> getViewPathAndExtension ( $ view ) ; return new View ( $ path , $ this -> mergeVariables ( $ view , $ variables ) , $ this -> resolveRenderer ( $ extension ) ) ; }
Creates and returns a view instance.

@param  string          $view      View
@param  array           $variables View variables
@return \mako\view\View
Creates and returns a view instance .