Load a partial

@param  string $view
@param  string $partialDir
@param  array  $args
@throws UnknownPartialFileException
@return mixed
161752
public function loadPartial($view, $partialDir, $args)
    {
        $path = $partialDir.'.'.$view;

        if (! $this->view->exists($path)) {
            throw new UnknownPartialFileException("Partial view [$view] not found.");
        }

        $partial = $this->view->make($path, $args)->render();
        $this->regions[$view] = $partial;

        return $this->regions[$view];
    }
1099921
function loadTemplateAndPartials(templateFile, partialsDirectory, partialsExtension, options, cache, callback) {
	handleFile(null, templateFile, options, cache, function(err, partialData) {
		if (err) {
			return callback(err);
		}

		return loadAllPartials(partialData.partials, partialsDirectory, partialsExtension, options, cache, null, function(err, partials) {
			if (err) {
				return callback(err);
			}

			return callback(null, partialData.data, partials);
		});
	});
}
752021
function (filePath, model) {
            filePath = getFileWithExt(filePath);
            filePath = path.join(configure.partialViewDir, filePath);
            var partialTemp = saker.getView(filePath);
            try {
                var html = saker.compile(partialTemp, filePath).call({
                    layout: null
                }, model);
            } catch (err) {
                throw err;
            }
            return html;
        }
266127
public function partial($partialView, $data = [], $mergeData = [])
    {
        $factory = $this->getFactory();

        return $factory->render($partialView, $data, $mergeData);
    }
227802
protected function partial($resource, array $data = [])
	{
		if($resource instanceof ViewModelInterface)
		{
			return $this->view->render($resource, true);
		}
	
		return $this->view->render(new ViewModel($this->view->resolveResourcePath($resource), $data), true);
	}
639139
public function render($view, array $parameters = array(), Response $response = null)
    {
        if (null === $response) {
            $response = new Response();
        }

        // locate the full path to the view
        $matches = null;
        preg_match("/Bundle\\\([a-zA-Z0-9]+Bundle)\\\/i", get_class($this), $matches);
        if (isset($matches[1])) {
            $bundleName = $matches[1];

            // check that the view is not the full path already
            $matchesView = null;
            preg_match("/Bundle\\\\([a-zA-Z0-9]+Bundle)\\\\/i", $view, $matchesView);

            if (!isset($matchesView[1])) {
                // view is not the full path, so prepend the bundle views dir
                $bundle = $this->getApplication()->getBundle($bundleName);
                $bundle->getBaseDir();
                $view = $bundle->getBaseDir().'/Ressources/views/'.$view;
            }
        } else {
            $view = $this->getApplication()->getBBDir().'/Resources/views/'.$view;
        }

        try {
            $this->renderer = $this->getApplication()->getRenderer();
            $content = $this->renderer->partial($view, $parameters);
            $response->setContent($content);
        } catch (\Exception $e) {
            throw $e;
        }

        return $response;
    }
409276
public function watchWithLayout($view, $args = array(), $type = null)
    {
        try {
            return $this->scopeWithLayout($view, $args, $type);
        } catch (\InvalidArgumentException $e) {
            return $this->ofWithLayout($view, $args, $type);
        }
    }
1134829
public function loadPartial($name, array $vars = array())
    {
        $partialTemplateFile = $this->getPartialBag()->getPartialFile($name);

        if (is_file($partialTemplateFile)) {
            extract(array_replace_recursive($vars, $this->variables));
            include($partialTemplateFile);
        } else {
            return false;
        }
    }
26503
function loadPartials(template, templatePath) {
    var templateDir = path.dirname(templatePath)

    var partialRegexp = new RegExp(
      escapeRegex(mustache.tags[0]) +
        '>\\s*(\\S+)\\s*' +
        escapeRegex(mustache.tags[1]),
      'g'
    )

    var partialMatch
    while ((partialMatch = partialRegexp.exec(template))) {
      var partialName = partialMatch[1]

      if (!partials[partialName]) {
        try {
          var partialPath = null
          var partial = null

          // ignore `partial` with file extension.
          // e.g.
          //   1, `{{> ./path/to/partial.html }}`
          //   2, `{{> ./path/to/partial. }}`
          if (path.extname(partialName) !== '') {
            partialPath = path.resolve(templateDir, partialName)
            partial = fs.readFileSync(partialPath, 'utf8')
          } else {
            // ignore `partial` file is exists without file extension.
            // e.g.
            //   1, `{{> ./path/to/partial }}` is exists.
            //   2, `{{> ./path/to/.partial }}` is exists.
            partialPath = path.resolve(templateDir, partialName)

            if (fs.existsSync(partialPath)) {
              partial = fs.readFileSync(partialPath, 'utf8')
            } else {
              // or check if `partial + options.extension` is exists.
              // e.g.
              //   if `options.extension` equals ".html":
              //   the `{{> ./path/to/partial }}` will load
              //   `./path/to/partial.html`.
              if (typeof options.extension === 'string') {
                partialPath = path.resolve(
                  templateDir,
                  partialName + options.extension
                )

                if (fs.existsSync(partialPath)) {
                  partial = fs.readFileSync(partialPath, 'utf8')
                }
              }

              // when `options.extension` is not a string or
              // `partialName + options.extension` does not exists.
              // try use `.mustache` extension to load `partial` file.
              if (partial === null) {
                partialPath = path.resolve(
                  templateDir,
                  partialName + '.mustache'
                )

                partial = fs.readFileSync(partialPath, 'utf8')
              }
            }
          }

          partials[partialName] = partial
          loadPartials.call(this, partial, partialPath)
        } catch (ex) {
          this.emit(
            'error',
            new PluginError(
              'gulp-mustache',
              // use `ex.message` property instead of `partialPath`,
              // because `this.emit()` seems not a sync method.
              // also the `ex.message` property provide more details
              // about error information.
              'Unable to load partial file: ' + ex.message
            )
          )
        }
      }
    }
  }
327264
public function loadCommandLine(array $argv)
  {
    for ($i=0; $i<sizeof($argv); $i++) {
      $arg = $argv[$i];
      
      if (substr($arg, 0, 2) == "--") {
        $arg = substr($arg, 2);
        
        $parts = explode("=", $arg);
        $name = array_shift($parts);
        $value = implode("=", $parts);
        
        $this->{$name} = $value;
      }
    }
  }
1072892
private static function view()
    {
        $files = ['View'];
        $folder = static::$root.'MVC/View'.'/';

        self::call($files, $folder);

        $files = ['Template', 'Views'];
        $folder = static::$root.'MVC/View/Libs'.'/';

        self::call($files, $folder);

        $files = ['ViewNotFoundException'];
        $folder = static::$root.'MVC/View/Exceptions'.'/';

        self::call($files, $folder);
    }
1350406
public function findView($view)
    {
        $file = $this->basePath("app/View/$view.php");
        if($this->findFile($file)) {
            return $file;
        }
        else {
            throw new Exception($file." View file is missing.");
            exit;
        }
    }
911602
public function load($view, $args = array())
    {
        $view = ltrim($view, '/');

        $segments = explode('/', str_replace('.', '/', $view));

        // Pop file from segments.
        $view = array_pop($segments);

        // Custom directory path.
        $pathOfView = app('path.base').'/'.implode('/', $segments);

        // Add temporary path with a hint type.
        $this->view->addNamespace('custom', $pathOfView);

        return $this->of('custom::'.$view, $args);
    }
540872
public function render($view, $data = [], $mergeData = [])
    {
        return $this->container['view']->make($view, $data, $mergeData)->render();
    }
1083842
public function partial( $partial, $child = '', $context = [] ) {
		if ( is_array( $child ) ) {
			// Optional argument $child not specified, flip input around.
			$context = $child;
			$child = '';
		}

		$templates = [];

		if ( $child ) {
			$templates[] = "partials/${partial}-${child}.php";
		}

		$templates[] = "partials/${partial}.php";

		app_render( $templates, $context );
	}
593454
public function load($view, $variables = [], $return = false)
    {
        $html = $this->getContents($view, $variables);

        if ($return === true) {
            return $html;
        }

        echo $html;

        return null;
    }
1231995
public function load($name) {
		
		if (!isset($this->templates[$name])) {
			try {
				$this->templates[$name] = $this->loadFile($name);
			} catch (Exception $e) {
				print "The partial, ".$name.", wasn't found so a pattern failed to build.\n";
			}
		}
		
		return (isset($this->templates[$name])) ? $this->templates[$name] : false;
		
	}