Resolve an absolute view to a relative one, if possible.

@param  string $view
@return string
966383
protected function resolveRelativeFilepath( $view ) {
		$normalized_view = MixedType::normalizePath( $view );
		$paths = [ STYLESHEETPATH, TEMPLATEPATH ];

		foreach ( $paths as $path ) {
			$path = MixedType::addTrailingSlash( $path );

			if ( substr( $normalized_view, 0, strlen( $path ) ) === $path ) {
				return substr( $normalized_view, strlen( $path ) );
			}
		}

		// Bail if we've failed to convert the view to a relative path.
		return $view;
	}
1137141
public static function get($view, $data = array()){

        if( $data ){
            self::$level = self::$level + 1;
            self::$data[ self::$level ] = (array) $data;
        }

        $file = SRC. "{$view}.php";

        // Parse view
        ob_start();

            self::process($file);

            if( $data ){

                unset(self::$data[ self::$level ]);
                self::$level = self::$level - 1;
                self::process(NULL);

            }

            $view = ob_get_contents();

        ob_end_clean();

        return $view;
    }
1090638
public function render($view)
    {
        extract($this->attributes);

        ob_start();
        require $view;

        return $this->minify === true
            ? $this->min(ob_get_clean())
            : ob_get_clean();
    }
41582
protected function view( $view ) {
		if ( preg_match( '/\.\w+$/', $view, $matches ) && in_array( $matches[0], $this->extensions() ) ) {
			return str_replace( '.', '/', preg_replace( '/' . $matches[0] . '$/', '', $view ) ) . $matches[0];
		}

		return $this->extension( str_replace( '.', '/', $view ) );
	}
866946
protected function populateView($view)
    {
        $view = $this->initViewVars($view);
        $view = $this->initViewContentBlocks($view);

        return $view;
    }
586561
public function getCacheKeyForView($view, $key = null)
    {
        $parts = [$this->cacheKey, $view];

        if ($key !== null) {
            $parts[] = $key;
        }

        return implode('.', $parts);
    }
581448
public function getSubstituteForView(View $view)
    {
        foreach ($this->getContextualSubstitutes() as $substitute) {
            if ($substitute->getView() === $view) {
                return $substitute;
            }

            while ($template = $view->getTemplate()) {
                if ($substitute->getView() === $template) {
                    return $substitute;
                }
            }
        }
    }
503796
public function get($view)
    {
        $file = str_replace('.', '/', $view);
        //
        $link1 = root().'resources/views/'.$file.'.atom.php';
        $link2 = root().'resources/views/'.$file.'.atom';
        //
        if (file_exists($link1)) {
            $link3 = $link1;
        } elseif (file_exists($link2)) {
            $link3 = $link2;
        }
        //
        $content = file_get_contents($link3);
        //
        return $content;
    }
919191
public function includeFunc( View $view)
	{
		if( $this->isFunc() )
		{
			Helper::includeFile( $this->getFuncFilePath(), ["view" => $view], false, true );
		}
		return $this;
	}
555098
public function setView($view)
    {
        $this->view = $view;

        $this->setDisplay(function ($model) {
            $this->data['model'] = $model;

            return view($this->getView(), $this->data);
        });

        return $this;
    }
369859
private function getPath($view)
    {
        $tmp = explode(':', $view);
        $bundlePath = $this->kernel->getBundle($tmp[0])->getPath();

        return $bundlePath . '/Resources/views/' . $tmp[1] . '/' . $tmp[2];
    }
1323131
public function resolveViewName(string $name): ?string
    {
        if (!array_key_exists($name, $this->cache)) {
            $this->collection->sort();
            $view = $this->getRouter()->route(new Context($name));
            if (!is_string($view)) {
                $view = null;
            }
            $this->cache[$name] = $view;
        }
        return $this->cache[$name];
    }
891883
protected function render($view)
    {
        $view = $this->getViewPath().$view.'.php';
        if (empty($this->attributes) === true) {
            $this->template->setAttributes(
                $this->attributes = $this->getAttributes()
            );
        }

        return $this->template->render($view);
    }
98468
protected function resolveFromCustomFilepath( $view ) {
		$directory = $this->getDirectory();

		if ( $directory === '' ) {
			return '';
		}

		// Normalize to ensure there are no doubled separators.
		$file = MixedType::normalizePath( $directory . DIRECTORY_SEPARATOR . $view );

		if ( ! file_exists( $file ) ) {
			// Try adding a .php extension.
			$file .= '.php';
		};

		return file_exists( $file ) ? $file : '';
	}
1246481
private function resolveViewPath($viewPath)
    {
        $path = realpath($this->_viewsDir . dirname($viewPath)) . DIRECTORY_SEPARATOR . basename($viewPath);
        return $path;
    }
72882
public function render($view): string
    {
        if (!($view instanceof IView)) {
            return $view;
        }

        $path = $this->resolveViewName($view->viewName());

        if ($path === null) {
            return '';
        }

        $engine = $this->resolver->resolve($path);

        return $engine->build($path, $view->viewVariables());
    }
718436
public function findView($view)
	{
		$view = $this->viewFolder.DIRECTORY_SEPARATOR.ltrim($view, DIRECTORY_SEPARATOR);

		return $this->finder->findFileReversed($view);
	}