Get the contents of one of the view with the given name.

@param string $name

@return string
339425
protected function file($name)
    {
        $path = PathHelper::normalizePath(
            $this->path.DIRECTORY_SEPARATOR.str_replace('.', '/', $name).'.blade.php'
        );

        return file_exists($path) ? file_get_contents($path) : '';
    }
463845
public function getPartial(string $name)
    {
        if (isset($this->partials[$name])) {
            return $this->partials[$name];
        }

        return null;
    }
139711
private function getContent($name)
    {
        $filename = $this->getCacheFileName($name);
        if (!is_file($filename)) {
            return false;
        }

        if ($this->options['thread_safe']) {
            $fd = fopen($filename, 'r+');
            flock($fd, LOCK_SH);
            $fc = fread($fd, filesize($filename));
            fclose($fd);

            return $fc;
        } else {
            return file_get_contents($filename);
        }
    }
1116079
public static function getFormatTemplate($name) {
        $file = sprintf(
            '%s/Model/template/format/%s.html',
            __DIR__,
            $name
        );

        if (!file_exists($file)) {
            return null;
        }

        if (!isset(self::$templates[$name])) {
            self::$templates[$name] = file_get_contents($file);
        }

        return self::$templates[$name];
    }
266668
private function renderView($name)
    {
        return $this->layout
            ->with($this->data)
            ->nest('content', $name, $this->data);
    }
714027
public static function get($name)
    {
        if (isset($_REQUEST[$name])) {
            return $_REQUEST[$name];
        }

        if (isset($_GET[$name])) {
            return $_GET[$name];
        }

        return;
    }
734131
public function actionContents($name = '')
    {
        if (empty($name)) {
            $name = Content::TERMS_AND_CONDS;
        }
        $model = Content::fill($name);
        if ($model->load(Yii::$app->request->post())) {
            if (User::can(Rbac::PERM_CHANGE_SETTINGS)) {
                if ($model->save()) {
                    $this->success(Yii::t('podium/flash', 'Content has been saved.'));
                } else {
                    $this->error(Yii::t('podium/flash', 'Sorry! There was some error while saving the content.'));
                }
            } else {
                $this->error(Yii::t('podium/flash', 'You are not allowed to perform this action.'));
            }
            return $this->refresh();
        }
        return $this->render('contents', ['model' => $model]);
    }
776366
protected function getRequestContent($name)
    {
        if (!$stub = $this->getRequestStub($name)) {
            return '';
        }

        $namespace = $this->appNs.'\Http\Requests\\'.implode('\\', $this->sectionSegmentsStudly);

        return strtr($stub, array_merge($this->getCommonReplacements(), [
            '{{namespace}}' => $namespace,
        ]));
    }
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);
    }
395104
public function get(string $name): ?string
    {
        return $this->dataContainer[RequestDataContainer::VAR_HEADER_RAW][$name] ?? null;
    }
804653
public function getDetail($name)
    {
        Assert::oneOf($name, array_keys($this->details), 'ParsedKey::getDetail() expected one of: %2$s. Got: %s');

        return $this->details[$name];
    }
1187311
public function getContent($name)
    {
        return $this->getContents()->filter(function (Content $content) use ($name) {
            return $content->getArea()->getName() == $name;
        })->first();
    }
992486
public function getByName($name)
    {
        if (!isset($this->nameMap[$name])) {
            return null;
        }

        return $this->get($this->nameMap[$name]);
    }
164684
public function getView($name, $data = [])
    {
        $view = 'missing-page';

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

        return view('page::' . $view, $data);
    }
120631
public static function getDescriptionByName($name)
    {
        $key = strtoupper($name);
        if (isset(self::$availableNameList[$key])) {
            return self::$availableNameList[$key];
        } else {
            return false;
        }
    }
21887
public function getAttr(string $name): string {
        $node = $this->collection()->first();

        if (!($node instanceof \DOMElement)) {
            return '';
        }

        $result = $node->getAttribute($name);

        if (empty($result)) {
            return '';
        }

        return $result;
    }
589918
public static function loadCoreView(string $name) {
      $base = __DIR__ . '/../../Views/';
      if (!file_exists($base . $name . '.view')) {
        throw new \Nuki\Exceptions\Base('The view file "' . $name . '" does not exist.');
      }
      
      return file_get_contents($base . $name . '.view');
    }