Rename the stubs with PHP file extensions.

@return void
186306
protected function renameStubs()
    {
        foreach ($this->stubsToRename() as $stub) {
            (new Filesystem)->move($stub, str_replace('.stub', '.php', $stub));
        }
    }
485606
protected static function fill_classmap_renames_cache() {
        global $CFG;

        self::$classmaprenames = array();

        self::load_renamed_classes("$CFG->dirroot/lib/");

        foreach (self::$subsystems as $subsystem => $fulldir) {
            self::load_renamed_classes($fulldir);
        }

        foreach (self::$plugins as $plugintype => $plugins) {
            foreach ($plugins as $pluginname => $fulldir) {
                self::load_renamed_classes($fulldir);
            }
        }
    }
725102
public function rename($oldName, $newName)
	{
		$form = $this->get($oldName);
		$this->delete($oldName);
		$this->add($newName, $form['code'], $form['title']);
	}
548564
def rename(args):
    """"""
    old_name, new_name = args.names
    add_tags(resources.ec2.Instance(resolve_instance_id(old_name)), Name=new_name, dry_run=args.dry_run)
1142351
public static void renameFiles(String folder, String prefix, String suffix, int start) {
        renameFiles(scanFolderAsArray(folder), prefix, suffix, start);
    }
1008701
function (oldPath, newPath, callback) {
	fs.rename( oldPath, newPath, function (err) {
		if (err) {
			callback( err );
		} else {
			callback( null, {
				filename: newPath.split( '/' ).pop(),
				filepath: newPath
			});
		}
	});
}
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;
    }
297293
public function renameFile($filename, $rename)
    {
        $this->renameDirectory($this->absolutizePath($filename), $this->absolutizePath($rename));
    }
55569
public static void renameFiles(String[] filePath, String prefix, String suffix, int start) {
        renameFiles(getFiles(filePath), prefix, suffix, start);
    }
904148
public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, array $extensions, $extra = null)
    {
        $this->stub = $stub;

        $this->replaceResource($modelName);

        return $this->stub;
    }
632788
protected function _renameToTmp()
    {
        $tmpTableName = $this->_name;
        $tableNames = $this->_database->getTableNames();
        do {
            $tmpTableName .= '_bak';
        } while (in_array($tmpTableName, $tableNames));
        // Use quoteIdentifier() instead of prepareIdentifier() because the
        // temporary name is not identified as a keyword.
        $tmpTableName = $this->_database->quoteIdentifier($tmpTableName);
        $this->alter("RENAME TO $tmpTableName");
        return $tmpTableName;
    }
366032
public function rename($tableNames = [])
    {
        $schema = '';

        $schema .= strtoupper(__FUNCTION__).' TABLE '.PHP_EOL;

        if (is_array($tableNames)) {
            $i = 0;

            $arrCount = count($tableNames);

            foreach ($tableNames as $key => $value) {
                $schema .= '`'.$key.'` TO `'.$value.'`';

                $comma = ($i < $arrCount - 1) ? ',' : '';
                $schema .= $comma.PHP_EOL;
                $i++;
            }
        } else {
            $schema .= '`'.$this->database.'.`'.$this->tableName.'` TO `'.$tableNames.'`'.PHP_EOL;
        }

        $this->schema = $schema;

        return $this;
    }
253753
private function renameKey()
    {
        try {
            list($file, $key) = explode('.', $this->argument('oldKey'), 2);
        } catch (\ErrorException $e) {
            $this->error('Could not recognize the key you want to rename.');

            return;
        }

        if (Str::contains($this->argument('newKey'), '.')) {
            $this->error('Please provide the new key must not contain a dot.');

            return;
        }

        $newKey = preg_replace('/(\w+)$/i', $this->argument('newKey'), $key);

        $files = $this->manager->files()[$file];

        $currentValues = [];

        foreach ($files as $languageKey => $filePath) {
            $content = Arr::dot($this->manager->getFileContent($filePath));

            $currentValues[$languageKey] = isset($content[$key]) ? $content[$key] : '';
        }

        $this->manager->removeKey($file, $key);

        $this->manager->fillKeys(
            $file,
            [$newKey => $currentValues]
        );
    }
1090216
function init_extensions()
	{
		$filename = $this->froot.'cfg/extensions.php';
		if (is_file($filename))
		{
			include_once($filename);
		}

		$this->extensions = new EresusExtensions();
	}
1306296
protected function renameConstraints($constraints = array(), $prefix = null, $backup = null)
	{
		$this->connect();

		foreach ($constraints as $constraint)
		{
			$this->setQuery('sp_rename ' . $constraint . ',' . str_replace($prefix, $backup, $constraint));
			$this->execute();
		}
	}
803807
protected function copyFiles()
    {
        $files = new Filesystem;
        array_map(function ($file) use ($files) {
            $files->copy("{$this->stubDirectory}/{$file}", "{$this->sageRoot}/resources/assets/{$file}");
        }, $this->getFileList());
    }
1116935
private function updatePrefixes()
    {
        foreach ($this->page['prefixes'] as $prefix) {
            if (!in_array($prefix, $this->prefixes)) {
                $this->prefixes[] = $prefix;
            }
        }
    }