Get the evaluated contents of the view at the given path.

@param  string  $__path
@param  array   $__data
@return string
334000
protected function evaluatePath($__path, $__data)
	{
		ob_start();

		extract($__data);

		// We'll evaluate the contents of the view inside a try/catch block so we can
		// flush out any stray output that might get out before an error occurs or
		// an exception is thrown. This prevents any partial views from leaking.
		try
		{
			include $__path;
		}
		catch (\Exception $e)
		{
			$this->handleViewException($e);
		}

		return ltrim(ob_get_clean());
	}
12166
def GetDataByPath(self, path):
    
    _, path_data = self._paths.get(path, (None, None))
    return path_data
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());
    }
38655
protected function renderMigration($___view___, array $___data___ = null)
    {
        ob_start();
        ob_implicit_flush(false);

        if ($___data___) {
            extract($___data___);
        }
        include $___view___;

        return ob_get_clean();
    }
189561
public function get_js($path='', array $data=null, $encapsulated = true){
    if ( \is_array($path) ){
      $data = $path;
      $path = '';
    }
    if ( $r = $this->get_view($path, 'js', $data) ){
      return '<script>'.
        ( $encapsulated ? '(function($){' : '' ).
        ( empty($data) ? '' : 'var data = '.\bbn\x::js_object($data).';' ).
        $r.
        ( $encapsulated ? '})(jQuery);' : '' ).
        '</script>';
    }
    return false;
	}
943350
static function getArrayValue(&$data,$name=NULL,$defval='') {   
        if($name == NULL) return($data);
        if(!is_array($data)) return($defval);
        
        if(is_array($name))
            $path = $name;
        else
            $path = explode(".", $name);

        if(sizeof($path) < 1) return $defval;
        
        $ptr=&$data; 
        for($i=0;$i < sizeof($path); $i++) {            
            $attr = $path[$i];
            if(!isset($ptr[$attr])) return $defval;
            $ptr = &$ptr[$attr];
        }
        
        // kraj
        return($ptr === NULL || (is_string($ptr) && strlen($ptr) < 1) ? $defval : $ptr);
    }
700124
def read_data(file_path):
    

    if not is_valid(file_path):
        write_data(file_path, {})

    db = open_file_for_reading(file_path)
    content = db.read()

    obj = decode(content)

    db.close()

    return obj
1267313
protected function view($path, $data = [])
    {
        $view = $this->baseViewPath . $path;

        // explode on package prefix
        // format view path
        $pieces = explode("::", $path);
        if (count($pieces) >= 2) {
            $view = $pieces[0] . "::";
            $view .= $this->baseViewPath . $pieces[1];
        }

        return view($view, $data)
            ->with('image', $this->getImage())
            ->with('title', $this->getTitle())
            ->with('description', $this->getDescription());
    }
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;
	}
73849
public function view(string $path, array $data = [], bool $return = false)
  {
    if ($this->headers !== ['Content-Type: application/json']) {
      foreach($this->headers as $header) {
        header($header);
      }
    }

    return View::make($path, $data, $return);
  }
1036336
public function parsePhp($___file, $___evalString = false)
    {
        Argument::i()
            //argument 1 must be a string
            ->test(1, $___file, 'string')
            //argument 2 must be a boolean
            ->test(2, $___evalString, 'bool');
        
        // Extract the values to a local namespace
        extract($this->data, EXTR_SKIP);

        if ($___evalString) {
            return eval('?>'.$___file.'<?php;');
        }
        
        // Start output buffering
        ob_start();
        // Include the template file
        include $___file;
        // Get the contents of the buffer
        $___contents = ob_get_contents();
        // End buffering and discard
        ob_end_clean();
        // Return the contents
        return $___contents;
    }
164684
public function getView($name, $data = [])
    {
        $view = 'missing-page';

        if (view()->exists('page::' . $name)) {
            $view = $name;
        }

        return view('page::' . $view, $data);
    }
151302
public function applyView($view_path, array $params)
    {
        $out = $this->templating
                ->render($view_path, $params);
        
        return html_entity_decode($out);
    }
239056
public static function Get($view_name, $data = null)
    {
        ob_start();
        include static::$ViewRoot . $view_name . '.php';
        $view = ob_get_contents();
        ob_end_clean();
        $result = $view;
        return $result;
    }
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);
    }
822188
public function dump($data, $path = null)
    {
        if ($path !== null) {
            return file_put_contents($path, $data);
        } else {
            echo $data;
        }
    }
765131
public function render($viewPath, array $data = null, $bypass = false)
	{
	    $this->setView($viewPath);

        if (!is_null($data)) {
            $this->setData($data);
        }


        if (!$this->isAjax() && $this->getLayout() !== null && !$bypass) {
            return $this->renderLayout($this->getSharedData());
        }

        return $this->renderView($this->getView(), $this->getData());
	}