October\Rain\Installer\Traits\SetupHelper
Overview
SetupHelper is shared logic for the handlers
Protected Properties
protected array $userConfig
userConfig is a temporary store of user input config values
Public Methods
public getAvailableLocales()
public getAvailableLocales(): void
getAvailableLocales returns available system locales
Protected Methods
protected addModulesToGitignore()
protected addModulesToGitignore($gitignore): void
protected checkDatabase()
protected checkDatabase($type, $host, $port, $name, $user, $pass): void
checkDatabase validates the supplied database configuration
protected checkEnvWritable()
protected checkEnvWritable(): void
checkEnvWritable checks to see if the app can write to the .env file
protected checkSqliteFile()
protected checkSqliteFile($filename): void
validateSqliteFile will establish the SQLite engine
protected encodeEnvVar()
protected encodeEnvVar($value): void
encodeEnvVar for compatibility with certain characters
protected getComposerUrl()
protected getComposerUrl($withProtocol = true): string
getComposerUrl returns the endpoint for composer
protected getEnvVar()
protected getEnvVar($key, $default = null): void
getEnvVar specifically from installer specified values. This is needed since the writing to the environment file may not update the values from env()
protected getKeyLength()
protected getKeyLength($cipher): int
getKeyLength returns the supported length of a key for a cipher
protected getRandomKey()
protected getRandomKey(): string
getRandomKey generates a random application key
protected injectJsonToFile()
protected injectJsonToFile($filename, $jsonArr, $merge = false): void
injectJsonToFile merges a JSON array in to an existing JSON file. Merging is useful for preserving array values.
protected mergeRecursive()
protected mergeRecursive($array1, $array2): void
mergeRecursive substitutes the native PHP array_merge_recursive to be more config friendly. Scalar values are replaced instead of being merged in to their own new array.
protected processWantString()
protected processWantString($version): void
processWantString ensures a valid want version is supplied
protected refreshEnvVars()
protected refreshEnvVars(): void
refreshEnvVars will reload defined environment variables
protected setComposerAuth()
protected setComposerAuth($email, $projectKey): void
setComposerAuth configures authentication for composer and October CMS
protected setDemoContent()
protected setDemoContent($confirm = true): void
setDemoContent instructs the system to install demo content or not
protected setEnvVar()
protected setEnvVar($key, $value): void
setEnvVar writes an environment variable to disk
protected setEnvVars()
protected setEnvVars($vars): void
setEnvVars sets multiple environment variables