Get the evaluated contents of the view.

@param  string $path
@param  array  $data
@return string
337393
public function get($path, array $data = array())
    {
        $this->lastCompiled[] = $path;

        // If this given view has expired, which means it has simply been edited since
        // it was last compiled, we will re-compile the views so we can evaluate a
        // fresh copy of the view. We'll pass the compiler the path of the view.
        if ($this->compiler->isExpired($path)) {
            $this->compiler->compile($path);
        }

        $raw = (isset($data['raw']) && $data['raw']) ? true : false;
        $compiled = $this->compiler->getCompiledPath($path, $raw);

        // convert objects to arrays
        $data = array_map('self::convertObjectToArray', $data);

        // Once we have the path to the compiled file, we will evaluate the paths with
        // typical PHP just like any other templates. We also keep a stack of views
        // which have been rendered for right exception messages to be generated.
        $results = $this->evaluatePath($compiled, $data);

        array_pop($this->lastCompiled);

        return $results;
    }
914449
public static function path(array $data, $path, $default = null)
    {
        $path = (array) $path;

        foreach ($path as $key) {
            if (!is_array($data) || !array_key_exists($key, $data)) {
                return $default;
            }
            $data = $data[$key];
        }

        return $data;
    }
1623
public function get_view(string $path, string $mode = 'html', array $data=null){
    if ( !router::is_mode($mode) ){
      die("Incorrect mode $path $mode");
    }
    $view = null;
    if ( $this->has_view($path, $mode) ){
      $view = self::$loaded_views[$mode][$path];
    }
    else if ( $info = $this->router->route($path, $mode) ){
      $view = new mvc\view($info);
      $this->add_to_views($path, $mode, $view);
    }
    if ( \is_object($view) && $view->check() ){
      return \is_array($data) ? $view->get($data) : $view->get();
    }
    return '';
  }
782036
private function getData(string $path)
    {
        if (empty($this->configurations)) {
            return null;
        }

        return $this->configurations[$path] ?? null;
    }
407463
public function renderView($path, $data)
    {
        $obLevel = ob_get_level();
        ob_start();
        extract($data);

        /*
         | We will try to include view file and check content into try catch block
         | so that if any exception occurs output buffer will get flush out.
        */
        try {
            include $path;
        } catch (Exception $e) {
            $this->handleViewException($e, $obLevel);
        }

        return ltrim(ob_get_clean());
    }
33575
public function getDownloadTitle($path, array $data = []): string
    {
        if (null === ($data = $this->getDownloadData($path, $data))) {
            return '';
        }

        return $data['title'];
    }
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;
    }
324910
protected function getPathContent($data)
	{
		$info = file_get_contents($this->path);
		list($expires, $hits) = explode(',', $info);
		if ($expires <= time())
		{
			// it has expires
			unlink($this->path);
			$hits    = 0;
			$expires = null;
		}
		if ($data == 'hits')
		{
			return $hits;
		}
		if ($data == 'expires')
		{
			return $expires;
		}

		return null;
	}
1220627
public function get($path, array $data = array())
    {
        // Instance Twig compiler.
        $twigCompiler = new TwigCompiler($this->app['config'], $this->app['view']);

        return $twigCompiler->render($path, $data);
    }
194549
public function get($path, array $data = array())
    {
        // If this given view has expired, which means it has simply been edited since
        // it was last compiled, we will re-compile the views so we can evaluate a
        // fresh copy of the view. We'll pass the compiler the path of the view.
        if ($this->compiler->isExpired($path))
        {
            $this->compiler->compile($path);
        }

        # SAVE VIEWS INFO IN SERVER DATA
        $_SERVER['view_used'] = realpath($path);

        $compiled = $this->compiler->getCompiledPath($path);

        return $this->evaluatePath($compiled, $data);
    }
300168
public function getContent($path)
    {
        /* @var $response \Guzzle\Http\Message\Response */
        $response = $this->getBrowser()->get($path)->send();
        if ($response->isError()) {
            throw new \RuntimeException('Failed to query the server '.$this->host);
        }
        if ($response->getStatusCode() !== 200 || !($html = $response->getBody(true))) {
            return;
        }
        $html = iconv('windows-1251', 'utf-8', $html);

        // clean content
        $config = [
            'output-xhtml' => true,
            'indent' => true,
            'indent-spaces' => 0,
            'fix-backslash' => true,
            'hide-comments' => true,
            'drop-empty-paras' => true,
            'wrap' => false,
        ];
        $tidy = new \tidy();
        $tidy->parseString($html, $config, 'utf8');
        $tidy->cleanRepair();
        $html = $tidy->root()->value;
        // ignore blocks
        $html = preg_replace('/<noembed>.*?<\/noembed>/is', '', $html);
        $html = preg_replace('/<noindex>.*?<\/noindex>/is', '', $html);
        // remove noembed
        return $html;
    }
755588
public function compile(string $path, array $data = [])
    {
        // If the file can't be found it's probably supplied as a template within
        // one of the base directories
        $path = $this->find($path);

        // Make sure that we use the right resolver for the initial file
        $engine = $this->factory->getEngineFromPath($path);

        // this path needs to be string
        return $view = new View(
            $this->factory,
            $engine,
            $path, // view (not sure what it does)
            $path,
            $data
        );
    }
303535
public static function get($path, $data = [])
	{
		ob_start();

		extract($data);

		try {
			$basePath = static::getInstance()->basePath;

			if ($basePath !== null) {
				if (mb_substr($path, 0, 1) === static::DIRECTORY_SEPARATOR) {
					$path = mb_substr($path, 1);
				}

				if (mb_substr($basePath, -1) === static::DIRECTORY_SEPARATOR) {
					$basePath = mb_substr($basePath, 0, -1);
				}

				$path = $basePath . static::DIRECTORY_SEPARATOR . $path;
			}

			include $path;
		} catch (\Exception $e) {
			ob_get_clean();
			throw $e;
		}

		return ob_get_clean();
	}
822188
public function dump($data, $path = null)
    {
        if ($path !== null) {
            return file_put_contents($path, $data);
        } else {
            echo $data;
        }
    }
36048
public static function to($path, array $data = null )
	{
		//compose query string if data was set
		($data !== null) ? self::with($data) : '';

		//compose full url
		$path = (self::$query_string === null) ?  Url::link($path) : Url::link($path) . '?' . self::$query_string;

		//redirect to path
		header('Location: ' . $path);

		//stop any further html output
		exit();

	}
1362030
private function parseContent($path, $data)
    {
        $path = str_replace('.', '/', $path);
        $this->_factory = $this->_view->make($path, $data);
    }
645878
private function get_file_structure( $path ) {
		ob_start();
		$content    = include $path;
		$has_output = ob_get_clean();
		// did stuff output
		if ( ! empty( $has_output ) ) {
			$content = json_decode( $has_output, ARRAY_A );
		}

		return $content;
	}