Get the value represented by the key $data from the $view

Returns boolean false if unable to retrieve the value.

@param  string $data
@param  mixed $view
@return false|mixed
509428
private function getValue($data, $view)
    {
        if (is_scalar($view)) {
            return false;
        }

        if (is_array($view) || $view instanceof ArrayAccess) {
            if (! isset($view[$data])) {
                return false;
            }

            return $view[$data];
        }

        if (is_object($view)) {
            if (! isset($view->{$data})) {
                return false;
            }

            return $view->{$data};
        }

        return false;
    }
1188687
public function run($view, $data = array())
    {
        return parent::run(
            $view,
            \array_merge(View::get_additional_data($view, $data), $data)
        );
    }
588584
public function render($view, array $data = [])
    {
        // Get Body-Template
        $template = $this->getTemplate($view);

        // extend with default data
        $data += $this->data;

        // set tags
        foreach ($data as $name => $value) {
            $template->tag($name, $value);
        }

        // Render Page
        return $this->applyFunctions(get_maintemplate((string)$template));
    }
1204970
public function plain($view, array $data, $callback=null)
    {
        return $this->send(['text'=>$view], $data, $callback);
    }
259011
public function make($view, $data = [])
    {
        try {
            return $this->view->make($view, $data)->render();
        } catch (\InvalidArgumentException $e) {
            throw new ViewNotFoundException("No file found at '{$view}'");
        }
    }
326850
public function setView($view)
    {

        if (class_exists($view)) {
            //if we already have a default view
            $values = [];

            //grab all its parameters and store in parameters
            if (isset($this->view) && $this->view instanceof View) {

                $values = $this->view->getDataArray();
                $layout = $this->view->getLayout();

                //Load the newView;
                $this->view = $this->loadView($view, $values);

                if (!empty($layout)) {
                    $this->view->setLayout($layout);
                }
            }

            return $this;

        } else if (is_string($view)) {

            $this->response->addContent($view); //so that $this->view("Hi There");  will output Hi There;

            return $this;

        }

        return false; //no view set;
    }
570416
private function load($view) {

		$data = $this->data($view);

		if(file_exists($data['file'])) {

			extract($data['var']);

			require $data['file'];
		}
	}
406505
public function render($view, array $data = null)
	{
		$engine = new Engine($this->templatePath);
		$template = new Template($engine);
		return $template->render($view, $data);
	}
486423
public function create($view = null, array $data = [])
    {
        if (is_null($view)) {
            return $this;
        }

        return $this->render($view, $data, true)->content();
    }
452507
public static function view( $view = null, array $data = [] ) {
		if ( func_num_args() === 0 ) {
			return self::factory();
		}

		return self::factory()->make( $view, $data );
	}
922766
public function gather_data( View $view ) {
		$data = [];

		if ( $this->engine->bound( 'data' ) ) {
			$data = $this->engine->make( 'data' );
		}

		$data = array_merge( $view->get_data(), $data );
		$data = array_merge( $this->get_composer( $view ), $data );
		$data = array_merge( $this->get_wildcard_composer(), $data );

		foreach ( $data as $key => $value ) {
			if ( is_callable( $value ) ) {
				$data[$key] = call_user_func( $value, $view );
			}
		}

		$this->engine->bind( 'data', $data );
		$this->reset_composer( $view );
		$this->reset_wildcard_composer();

		return $data;
	}
215657
private function data($view) {


		$data['var'] = $this->module->get('var');

		if(isset($view['with']) ) {

			foreach((array) $view['with'] as $name => $value) {

				$data['var'][$name] = $value;
			}
		}

		$data['file'] = $this->getPath($view, $this->module->get('module'));


		return $data;
	}
267916
private function getDotValue($key, $view)
    {
        list($first, $second) = explode('.', $key, 2);

        $value = $this->getValue($first, $view);
        if (is_scalar($value)) {
            // To de-reference, we need a data set, not scalar data
            return '';
        }

        return $this->getValue($second, $value);
    }
1172417
public static function render($view, $data = array()){

        if( is_array($view) ){

            foreach( $view as $item ){
                self::render($item, $data);
            }

            return;
        }

        echo self::get($view, $data);
    }
275019
protected function buffer($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

        // Load view file (root location is declared in viewsPath var).
        include $this->container->get('config')['viewsPath'] . '/' . $view . '.php';

        // Return string.       
        $buffer = ob_get_contents();
        ob_end_clean();
        return $buffer;
    }
683878
public function fetch($view, array $data = [])
    {
        $file = $this->getViewFile($view);

        if (!is_file($file)) {
            throw new \RuntimeException("cannot render '$view' because the view file does not exist. File: $file");
        }

        /*
        foreach ($data as $k=>$val) {
            if (in_array($k, array_keys($this->attributes))) {
                throw new \InvalidArgumentException("Duplicate key found in data and renderer attributes. " . $k);
            }
        }
        */
        $data = array_merge($this->attributes, $data);

        try {
            ob_start();
            $this->protectedIncludeScope($file, $data);
            $output = ob_get_clean();
        } catch (\Throwable $e) { // PHP 7+
            ob_end_clean();
            throw $e;
        }

        return $output;
    }
810526
function viewResult( $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        if ( isset( $this->ViewResult[$view] ) )
        {
            return $this->ViewResult[$view];
        }
        return null;
    }