Build the view with the given name.

@param  string $name
@param  string|null $method
@return string
@throws \Illuminate\Contracts\Filesystem\FileNotFoundException
502174
protected function buildView($name, $method = null)
    {
        $replace = [];

        if ($this->option('parent')) {
            $replace = $this->buildParentReplacements();
        }

        if ($this->option('model')) {
            $replace = $this->buildModelReplacements($replace);
        }

        if ($this->option('parent')) {
            $replace['parent_dummy_view'] = $this->getParentViewName($name);
            $replace['parent_dummy_route'] = $this->getParentRouteName($name);
        }
        $replace['dummy_view'] = $this->getViewName($name);
        $replace['dummy_route'] = $this->getRouteName($name);

        return str_replace(array_keys($replace), array_values($replace), $this->files->get($this->getViewStub($method, $name)));
    }
1289909
public function findView($name)
	{
		if (substr($name, -9) !== '.mustache')
		{
			$name .= '.mustache';
		}

		if ( ! $file = parent::findView($name))
		{
			throw new Mustache_Exception_UnknownTemplateException('Could not locate: '.$name);
		}

		return $file;
	}
1009373
public function name($name = null)
    {
        if (!$this->name) {
            $this->name = $name ?: md5(json_encode(array_keys($this->files)));
        }

        return $this;
    }
1081800
protected function findOwnMethod($name) {
    $method = $this->getMethod($name);
    if ($this->qcn === $method->getDeclaringClassName()) {
      return $method;
    }
    return NULL;
  }
51163
function load($name): string {
    if (!isset($this->views[$name])) {
      $cacheKey = [__CLASS__, $name];
      $viewRenderer = $this->viewRenderer;

      /** @var \yii\caching\Cache $cache */
      $cache = $viewRenderer->cache;
      if ($viewRenderer->enableCaching && $cache->exists($cacheKey))
        $output = $cache->get($cacheKey);
      else {
        $path = FileHelper::localize($this->findViewFile($name));
        if (!is_file($path)) throw new InvalidCallException("The view file '$path' does not exist.");

        $output = @file_get_contents($path);
        if ($viewRenderer->enableCaching) $cache->set($cacheKey, $output, $viewRenderer->cachingDuration);
      }

      $this->views[$name] = $output;
    }

    return $this->views[$name];
  }
992340
private function getViewPath($name)
    {

        $module = $this->module_name !== NULL ? ($this->module_name) . DSC : '';
        return $this->getRealPath('views' . DSC . $module . $name);
    }
710680
private function recurseRecord($method, $name, array $data, $index = null)
    {
        // Get model and determine primary key column
        $class = Str::camel($name);
        $model = $this->{$class}()->getModel();
        $primaryKey = (isset($model->primaryKey)) ? $model->primaryKey : 'id';

        $key = array_get($data, $primaryKey);

        // Find record and perform action on it
        $record = $model->findOrCreateRecord($key);
        $result = $record->recurse($method, $data, $this->getParameters('ruleset', $name), $this->getParameters('messageset', $name));

        // Capture errors
        $this->errors = $this->mergeErrors($this->errors, $record->getErrorBag(), $index);

        // Attach relationhip to record
        if ($result) $this->setRelationship($record, $name, $class, $index);

        // Record failure
        return $result;
    }
1213674
public function view($name)
    {
        $fullPath = $name . ".phtml";
        $directory = dirname($fullPath);

        $globalDirPath = $this->appPath . "/Views/" . $directory;
        $fileName = $globalDirPath . "/" . basename($fullPath);

        if (!is_dir($globalDirPath)) {
            // Dir doesn't exist, make it
            mkdir($globalDirPath, 0777, true);
        }

        if (file_put_contents($fileName, "<!-- Created by CLI -->")) {
            echo Utils::colorize('Create ' . $fileName, 'SUCCESS');

            return true;
        } else {
            echo Utils::colorize('Can\'t create ' . $fileName, 'FAILURE');

            return false;
        }
    }
1152927
private function templateFile($name)
    {
        $filename = $this->viewPath . '/' . str_replace('.', DIRECTORY_SEPARATOR, $name) . '.blade.php';
        if (file_exists($filename)) {
            return $filename;
        }

        if (self::$manifest === null) {
            if (file_exists($this->pluginManifestOfViews)) {
                /** @noinspection PhpIncludeInspection */
                self::$manifest = include $this->pluginManifestOfViews;
            }
        }

        return isset(self::$manifest[$name]) ? base_path(self::$manifest[$name]) : null;
    }
452483
public function getView(string $name): SplFileInfo
    {
        $viewFactory = app(Factory::class);

        $pattern = str_replace('.', DIRECTORY_SEPARATOR, $name);
        $path = $viewFactory->getFinder()->find($name);

        $pos = strpos($path, $pattern);

        $directory = substr($path, 0, $pos);
        $filename = substr($path, $pos);

        return $this->createSplFileInfoInstance($directory, $filename);
    }
888970
public function create($name)
	{
		$model = Bauhaus::getInstance($name)->buildForm();

		return View::make($model->getView('create'))
			->with('name',  $name)
			->with('model', $model);
	}
594987
public function getMethod($name)
    {
        if (parent::hasMethod($name) == false) {
            return null;
        }
        
        $moufRefMethod = new MoufReflectionMethod($this, $name);
        return $moufRefMethod;
    }
537437
static function getAnnotation($name, $class, $method = NULL, $nullable = TRUE)
	{
		try {
			NULL === $method or $annotation = self::getMethodAnnotation($method, $name, $class);
			isset($annotation) or $annotation = self::getClassAnnotation($class, $name);
		} catch (ReflectionException $e) {
			$annotation = NULL;
		}

		return !$nullable && NULL === $annotation
			? self::annotationClass($name)
			: $annotation;
	}
1195120
public function generateView($name)
    {
        if (!$content = $this->getViewContent($name)) {
            return '';
        }

        $sectionSegments = $this->sectionSegments;

        if ($this->viewsDir) {
            array_unshift($sectionSegments, $this->viewsDir);
        }

        $path = base_path('resources/views/'.implode('/', $sectionSegments).'/'.$name.'.php');

        if (is_file($path)) {
            return '';
        }

        $this->createMissingDirs($path);

        return file_put_contents($path, $content) !== false ? $path : '';
    }
211861
public function build($name = null)
    {
        $caching = new Caching();
        $caching->setStack(new DebugStack());

        if ($this->debug && isset($this->debugDriver)) {
            $caching->setDriver($this->resolveDriver($this->debugDriver));

            return $caching;
        }

        if (null === $name) {
            $name = $this->configuration->get('caching.default', 'null');
        }

        $driver = $this->resolveDriver($name);
        $caching->setDriver($driver);

        return $caching;
    }
787948
public function render(?string $formId = null, ?string $view = null) : ?string
    {
        if (!$this->enabled()) {
            return null;
        }

        $useView = $view !== null ? $view : $this->view;

        if ($this->viewFactory->exists($useView)) {
            return $this->viewFactory->make($useView, $this->getViewData($formId))->render();
        }

        throw new FileNotFoundException("View '{$useView}' not found");
    }
1048081
protected function createView($name = null)
    {
        if ($name == null) {
            $name = $this->action();
        }
        Artisan::call('make:view', [
            'name' => $name
        ]);
        $this->info('View ' . undot_path($name) .'.blade.php created.');
    }