Get stub template for generated file.

@return string
190330
public function getStub()
    {
        $path = config('repository.generator.stubsOverridePath', __DIR__);

        if(!file_exists($path . '/Stubs/' . $this->stub . '.stub')){
            $path = __DIR__;
        }

        return (new Stub($path . '/Stubs/' . $this->stub . '.stub', $this->getReplacements()))->render();
    }
1223845
private function generateTemplatesCache()
    {
        /** @var \Twig_Loader_Filesystem $loader */
        $loader = $this->tpl->getLoader();
        $availablePaths = $loader->getPaths();
        if (!empty($availablePaths)) {
            foreach ($availablePaths as $path) {
                $this->generateTemplate($path);
            }
        }
    }
68515
protected function getTemplateContents()
    {
        return (new Stub('/route-provider.stub', [
            'MODULE' => $this->getModuleName(),
            'NAME' => $this->getFileName(),
            'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'),
        ]))->render();
    }
875100
private function loadTemplate()
    {
        return [
            0 => $this->template[0] != '' ? file_get_contents($this->template[0]) : '',
            1 => $this->template[1] != '' ? file_get_contents($this->template[1]) : '',
            2 => $this->template[2] != '' ? file_get_contents($this->template[2]) : '',
        ];
    }
717703
protected function compileRouteStub()
    {
        $stub = $this->files->get(substr(__DIR__,0, -5) . 'Stubs/route.stub');

        $this->buildStub($this->scaffoldCommandObj->getMeta(), $stub);

        return $stub;
    }
699152
private function getTemplate()
    {
        if ($this->template) {
            return $this->template;
        }

        return $this->template = $this->twig->load('@EkynaCms/Editor/Block/tabs.html.twig');
    }
1168021
protected function getHtmlTemplate(): string
    {
        if ($this->HtmlTemplate === null) {
            throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                ->setHtmlTemplate($this->HtmlTemplate);
        }
        if (empty($this->HtmlTemplate) == false) {
            eval("include '$this->HtmlTemplate';");
            return '';
        } else {
            $filepathold = (new \ReflectionClass(static::class))->getFileName();

            $filepath = strtr($filepathold, ['.php' => '.tpl.php']);
            if (is_file($filepath)) {
                eval("include '$filepath';");
                return $filepath;
            }

            $getFilename_no_Extension = (new Fileinfo($filepathold))
                ->getFilename_no_Extension();

            $filepath = dirname($filepath) . '/' . $getFilename_no_Extension . '/' . $getFilename_no_Extension . '.tpl.php';
            eval("include '$filepath';");
            if (is_file($filepath)) {
                return $filepath;
            } else {
                throw (new \xltxlm\template\Exception\Exception_Filenot_Exist())
                    ->setHtmlTemplate($this->HtmlTemplate);
            }
        }
    }
1034397
public function getStub()
    {
        if ($this->plain) {
            return $this->getPath();
        }

        if ($template = $this->template) {
            return Stub::create($template, $this->getReplacements())->render();
        }

        return parent::getStub();
    }
439658
public function getParentTemplateFilename() {

		if(empty($this->parentTemplateFilename)) {
		
			if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) {

				$this->parentTemplateFilename = $matches[1];

			}
		}

		return $this->parentTemplateFilename;
		
	}
1051439
protected function getStub($name)
    {
        if (is_file($path = base_path("resources/stubs/vendor/crud-generator/{$this->stubsGroup}/$name.stub"))) {
            return file_get_contents($path);
        }

        if (is_file($path = __DIR__."/../resources/stubs/{$this->stubsGroup}/$name.stub")) {
            return file_get_contents($path);
        }

        return '';
    }
1196796
protected function buildModuleFile()
    {
        $stubFiles = $this->getStub('module');

        $stub = $this->files->get($stubFiles);

        $this->replaceNamespace($stub);

        return $stub;
    }
917556
public function template($stub_path, array $arguments = [])
    {
        $this->outbox->put($this->context->file, $this->generate($this->read($stub_path), $arguments));
    }
1019782
protected function getContentTemplate()
	{
		$attributes = [
			'data'          => $this->attributes['src'],
			'style'         => $this->attributes['style'],
			'type'          => 'application/x-shockwave-flash',
			'typemustmatch' => ''
		];

		$flashVarsParam = '';
		if (isset($this->attributes['flashvars']))
		{
			$flashVarsParam = $this->generateParamElement('flashvars', $this->attributes['flashvars']);
		}

		$template = '<object>'
		          . $this->generateAttributes($attributes)
		          . $this->generateParamElement('allowfullscreen', 'true')
		          . $flashVarsParam
		          . '</object>';

		return $template;
	}
568145
public function getStubPath()
    {
        if (!is_null($this->stubPath)) {
            return $this->stubPath;
        }

        if ($this->config('stubs.enabled')) {
            return $this->config('stubs.path');
        }

        return $this->stubPath;
    }
732684
public function getStubPath()
    {
        if ($this->stubPath !== null) {
            return $this->stubPath;
        }

        if ($this->config('stubs.enabled') === true) {
            return $this->config('stubs.path');
        }

        return $this->stubPath;
    }
561032
public function getViewPath(): string
    {
        if (is_file($this->tplDistPath)) {
            if ($this->disableTplCache) {
                $this->buildViewTemplate();
            }
        } else {
            $this->buildViewTemplate();
        }
        return $this->tplDistPath;
    }
1056040
private function generateModel()
    {
        // Figure out the naming
        $model = ucfirst($this->argument('model'));
        $path = 'app/'.$model.'.php';
        $file = base_path().'/'.$path;

        // Copy the stub over
        if (file_exists($file)) {
            return $this->comment('Model already exists: '.$path);
        }
        file_put_contents($file, str_replace('{{model}}', $model, file_get_contents($this->stubs.'/model.stub')));
        $this->info('Model created: '.$path);
    }