Get stub replacements.

@return array
552692
public function getReplacements()
    {
        return array_merge(parent::getReplacements(), [
            'table_one' => $this->table_one,
            'table_two' => $this->table_two,
            'column_one' => $this->getColumnOne(),
            'column_two' => $this->getColumnTwo(),
            'table_pivot' => $this->getPivotTableName(),
            'timestamp' => $this->getTimestampReplacement(),
        ]);
    }
1291209
protected function replaceClassName(&$stub)
    {

        $className = $this->scaffoldCommandObj->getObjName('Name') . 'Controller';
        $stub = str_replace('{{class}}', $className, $stub);

        return $this;
    }
754790
protected function replaceFakerArray(&$stub, $fields, $timestamps, $softDeletes)
    {
        $array = [];

        foreach ($fields as $f){
            if(!empty($f['fakerFunction']) || !empty($f['fkey'])){
                $params = !empty($f['fakerFunctionParams']) ? "({$f['fakerFunctionParams']})":"";
                if(!empty($f['fkey']))
                    $array[] = "\"{$f['name']}\" => \"{$f['fkey_data']['faker']}\"";
                else
                    $array[] = "\"{$f['name']}\" => \$faker->{$f['fakerFunction']}{$params}";
            }
        }
        if($timestamps){
            $array[] = "\"created_at\" => now()";
            $array[] = "\"updated_at\" => now()";
        }
        if($softDeletes)
            $array[] = "\"deleted_at\" => NULL";

        if(count($array)) $array = trim(implode(",\n".str_repeat(' ', 8), $array), "\n");//implode(",\n", $array);
        else $array = "";

        $stub = str_replace('DummyFakerArray', $array, $stub);

        return $this;
    }
210326
protected function replaceName(&$stub)
    {
        $stub = str_replace('{{Class}}', $this->scaffoldCommandObj->getObjName('Names'), $stub);
        $stub = str_replace('{{class}}', $this->scaffoldCommandObj->getObjName('names'), $stub);
        $stub = str_replace('{{classSingle}}', $this->scaffoldCommandObj->getObjName('name'), $stub);
        $stub = str_replace('{{ClassSingle}}', $this->scaffoldCommandObj->getObjName('Name'), $stub);

        return $this;
    }
316642
protected function getStub()
    {
        if ($this->collection()) {
            $stub = config('stubs.path') . '/resource-collection.stub';
        } else {
            $stub = config('stubs.path') . '/resource.stub';
        }

        return file_exists($stub) ? $stub : parent::getStub();
    }
1055714
public function getDiffReplacements()
    {
        $data = array();
        foreach ($this->getSafeAttributes() as $attribute) {
            if ($attribute->isReplaced()) {
                $data[$attribute->getName()] = $attribute->getValues();
            }
        }
        foreach ($this->tracker->getReplacements() as $name) {
            $data[$name] = $this->get($name)->getValues();
        }
        return $data;
    }
347612
protected function replaceSchema(&$stub)
    {
        $tables = array_merge(
            $this->getSortedSingularTableNames(),
            $this->getSortedTableNames()
        );

        $stub = str_replace(
            ['{{columnOne}}', '{{columnTwo}}', '{{tableOne}}', '{{tableTwo}}'],
            $tables,
            $stub
        );

        return $this;
    }
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();
    }
675990
protected function replaceNamespace($stub)
    {
        $stub = str_replace('DummyNamespace', $this->getNamespace(), $stub);
        $stub = str_replace('DummyRootNamespace', trim($this->laravel->getNamespace(), '\\'), $stub);

        return $stub;
    }
13701
protected function getFormattedReplacements()
    {
        $time = $this->getMembers();

        $negative = $this->isNegative();

        return [
            self::HOUR_FORMAT          => sprintf('%02d', $time['hours']),
            self::MINUTE_FORMAT        => sprintf('%02d', $time['minutes']),
            self::SECOND_FORMAT        => sprintf('%02d', $time['seconds']),
            self::TOTAL_MINUTES_FORMAT => sprintf('%02d', $time['total_minutes']),
            self::SIGN_ANY             => $negative ? '-' : '+',
            self::SIGN_NEGATIVE        => $negative ? '-'  : '',
        ];
    }
382939
protected function getTemplateContents()
    {
        $module = $this->laravel['modules']->findOrFail($this->getModuleName());

        return (new Stub('/route-provider.stub', [
            'NAMESPACE'         => $this->getClassNamespace($module),
            'CLASS'             => $this->getFileName(),
            'MODULE_NAMESPACE' => $this->laravel['modules']->config('namespace'),
            'MODULE'           => $this->getModuleName(),
            'ROUTES_PATH'   => $this->getRoutesPath(),
        ]))->render();
    }
1345985
protected function parseStub( $stub, $replacements = [] )
	{
		$output = $stub;

		foreach ( $replacements as $key => $replacement )
		{
			$search = '{{' . $key . '}}';
			$output = str_replace( $search, $replacement, $output );
		}

		return $output;
	}
29509
protected function replaceSchema(&$stub)
    {
        $tables = $this->getSortedTableNames();

        $stub = str_replace(['{{columnOne}}', '{{columnTwo}}'],
            array_merge(array_map('str_singular', $tables), $tables), $stub);

        $stub = str_replace(['{{tableOne}}', '{{tableTwo}}'],
            array_merge(array_map('str_plural', $tables), $tables), $stub);

        return $this;
    }
981824
public function getAvailableOverrides()
    {
        $path   = $this->getPath();
        $suffix = $this->getSuffix();

        $glob   = "{$path}/*{$suffix}";
        $result = [];
        foreach (glob($glob) as $file) {
            $identifier          = basename($file, $suffix);
            $result[$identifier] = $file;
        }

        return $result;
    }
64343
protected function getMigrationStub()
	{
		$stub = $this->files->get(__DIR__.'/stubs/reminders.stub');

		return str_replace('password_reminders', $this->getTable(), $stub);
	}
452562
public function getFiles()
    {
        $name = $this->getParsedNameInput();
        $lucid = $this->option('lucid');

        return [
            'model' => [
                'path' => ! $lucid
                    ? '/app/' . ucfirst($name) .'.php'
                    : '/src/Data/' . ucfirst($name) . '.php',
                'stub' => ! $lucid
                    ? __DIR__ . '/../stubs/Model/Model.stub'
                    : __DIR__ . '/../stubs/Lucid/Model/Model.stub',
            ],
        ];
    }
821286
protected function populateStub($stub, $table)
    {
        $replacements = [
            '{{table}}' => $table
        ];

        return str_replace(array_keys($replacements), array_values($replacements), $stub);
    }