Retourne le contenu généré pour une requête.

@param  string $name
@return string
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,
        ]));
    }
1216394
protected function normalizeName($name)
    {
        if ($this->files->extension($name) === $this->extension) {
            $name = substr($name, 0, - (strlen($this->extension) + 1));
        }

        return $name;
    }
817922
protected function splitFileExtension($name)
    {
        $extension = '';
        $name_parts = explode('.', $name);
        if (isset($name_parts[1])) {
            $extension = array_pop($name_parts);
        }
        $filename = join('.', $name_parts);
        return compact('filename', 'extension');
    }
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);
        }
    }
671875
public function getRouteName($name)
    {
        $sectionPrefix = $this->getSection() ? $this->getSection() . '_' : '';

        return sprintf('%s_%s%s_%s', $this->metadata->getApplicationName(), $sectionPrefix, $this->metadata->getName(), $name);
    }
892059
protected function getExtendFile($name) {
        if (strpos($name, '@') === 0) {
            return $this->factory->invokeTheme('getFile', [substr($name, 1)]);
        }
        if (strpos($name, './') === 0) {
            return $this->file->getDirectory()
                ->getFile($this->factory->fileSuffix(substr($name, 2)));
        }
        if (strpos($name, '../') === 0) {
            return $this->file->getDirectory()->parent()
                ->getFile($this->factory->fileSuffix($name));
        }
        return $name;
    }
960943
protected function getViewPath($name)
    {
        $pieces = explode('/', $name);

        // dont plural if reserve word
        foreach ($pieces as $k => $value) {
            if (!in_array($value, config('generators.reserve_words'))) {
                $pieces[$k] = str_plural(snake_case($pieces[$k]));
            }
        }

        $name = implode('.', $pieces);

        //$name = implode('.', array_map('str_plural', explode('/', $name)));

        return strtolower(rtrim(ltrim($name, '.'), '.'));
    }
233723
public function hasText(string $name) : bool
    {
        return $this->textContentAreas->any(function (TextContentArea $contentArea) use ($name) {
            return $contentArea->name === $name;
        });
    }
70248
private function getDataByPath($name): string
    {
        $namePath = explode('.', $name);
        $out = $this->model;

        for ($i=0; $i < count($namePath); $i++) {

            $out = $i+1 < count($namePath) ?
                $out->{$namePath[$i]} : $out->{$namePath[$i].'_'.$this->language->getShortName()};

            if (is_array($out)) {
                for ($j=0; $j < count($out); $j++) {
                    $out[$j] = $out[$j]->{$namePath[$i+1].'_'.$this->language->getShortName()};
                }
                $out = implode(', ', $out);
                break;
            }
        }

        return trim($out, ', ');
    }
1128003
public function get(string $name): string {
        if (!isset($this->get[$name])) {
            return "";
        }
        return $this->get[$name];
    }
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) : '';
    }
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]);
    }
745000
protected function _prependPrefixToFilename($name)
    {
        $ds = DIRECTORY_SEPARATOR;
        $parts = explode($ds, $name);
        $filename = end($parts);

        if ($name === $filename
            || $filename[0] === $this->optionalDependencyPrefix) {
            return $this->optionalDependencyPrefix . $name;
        }

        return str_replace(
            $ds . $filename,
            $ds . $this->optionalDependencyPrefix . $filename,
            $name
        );
    }
1309719
public function getSource($name) {
        $path = $this->findTemplate($name);
        if(!$path){
            \Debug::stop($name,'Шаблон "'.$name.'" не найден');
        }
        return file_get_contents($path);
    }
1101627
private function getRealSiteName($name)
    {
        if (! is_null($name)) {
            return $name;
        }

        if (is_string($link = $this->getLinkNameByCurrentDir())) {
            return $link;
        }

        return basename(getcwd());
    }
402972
public function getViewFile($name){
        if(isset($this->options['locator'])){
            if($path = call_user_func($this->options['locator'], $name)){
                return $path;
            }
        }
        $path = '';
        if(isset($this->options['root'])){
            $path.=$this->options['root'].'/';
        }
        
        $path.=$name;
        return $path;
    }
1225089
function getSource($name)
    {
        if (isset($this->site->pages[$name])) {
            $content = $this->site->pages[$name];
        }
        else {
            throw new \Exception("Cannot find content \"$name\".");
        }

        if (!$content->template) {
            throw new \Exception("Content does not have a template");
        }

        if ($content->template !== 'none') {
            $block = 'content';

            // Custom Block?
            if (strpos($content->template, '::') !== false) {
                list($content->template, $block) = explode('::', $content->template);
            }

            // Create template content
            $template = "{% extends \"$content->template\" %}";
            $template .= "{% block $block %}";
            $template .= $content->content;
            $template .= "{% endblock %}";
        }
        else {
            $template = $content->content;
        }

        return $template;
    }