Install extends Controller
Handle the installation process via web or command line
Table of Contents
Properties
| $helpers | |
| $db_info | |
| $installed | |
| $params | |
| $server_timezone |
Methods
| __construct() | Set up |
| index() | Install |
| preAction() | Check installed status |
| process() | Process GUI installation |
| getMinReq() | Returns an array of minimum requirements |
| getOs() | Determine the operating system on this system |
| getRecReq() | Returns an array of recommended requirements |
| meetsMinReq() | Checks to ensure that the current system meets the required minimum requirements. |
| meetsRecReq() | Checks to ensure that the current system meets the recommended minimum requirements. |
| meetsReq() | Tests the requirements |
| setMessage() | Sets the given error type into the view |
| agreeCli() | Agree to terms and conditions |
| checkDb() | Check DB support |
| databaseCli() | Collect DB information, verify credentials and run DB installation |
| postInstall() | Finish the installation process by generating key pairs and installing base plugins |
| presetQueries() | Runs the given queries on the given model. The database connection must already be established. |
| processCli() | Process CLI installation |
| setupAccountCli() | Handle the initial staff account creation |
| systemRequirementsCli() | Handle system requirements check |
| tmpDir() | Determine the location of the temp directory on this system |
| writeConfig() | Write the config file details |
Properties
$helpers
protected
array<string|int, mixed>
$helpers
= ['Html', 'Form']
An array of helpers
$db_info
private
array<string|int, mixed>
$db_info
= []
An array of database connection details
$installed
private
bool
$installed
= \false
True if already installed, false otherwise
$params
private
array<string|int, mixed>
$params
= []
An array of parameters passed via CLI
$server_timezone
private
string
$server_timezone
= 'UTC'
The default server timezone
Methods
__construct()
Set up
public
__construct() : mixed
index()
Install
public
index() : mixed
preAction()
Check installed status
public
preAction() : mixed
process()
Process GUI installation
public
process() : mixed
getMinReq()
Returns an array of minimum requirements
protected
getMinReq() : array<string|int, mixed>
Return values
array<string|int, mixed> —An associative array of requirements
getOs()
Determine the operating system on this system
protected
getOs() : string
Return values
string —A 3-character OS name (e.g. LIN or WIN)
getRecReq()
Returns an array of recommended requirements
protected
getRecReq() : array<string|int, mixed>
Return values
array<string|int, mixed> —An associative array of requirements
meetsMinReq()
Checks to ensure that the current system meets the required minimum requirements.
protected
meetsMinReq() : mixed
Return values
mixed —Boolean true if all requirements met, an array of failed requirements on failure
meetsRecReq()
Checks to ensure that the current system meets the recommended minimum requirements.
protected
meetsRecReq() : mixed
Return values
mixed —Boolean true on success, an array of failed requirements on failure
meetsReq()
Tests the requirements
protected
meetsReq(array<string|int, mixed> $reqs) : bool|array<string|int, mixed>
Parameters
- $reqs : array<string|int, mixed>
-
An array of requirements to test
Return values
bool|array<string|int, mixed> —True if passing, an array of extensions that failed otherwise
setMessage()
Sets the given error type into the view
protected
setMessage(string $type, string $value[, bool $return = false ]) : mixed
Parameters
- $type : string
-
The type of message ("message", "error", "info", or "notice")
- $value : string
-
The text to display
- $return : bool = false
-
True to return the message, false to set it withing the view
agreeCli()
Agree to terms and conditions
private
agreeCli() : mixed
checkDb()
Check DB support
private
checkDb() : bool
Return values
bool —True if InnoDB is supported, false otherwise
databaseCli()
Collect DB information, verify credentials and run DB installation
private
databaseCli() : mixed
postInstall()
Finish the installation process by generating key pairs and installing base plugins
private
postInstall() : mixed
presetQueries()
Runs the given queries on the given model. The database connection must already be established.
private
presetQueries(Model $model, array<string|int, mixed> $queries) : mixed
Parameters
- $model : Model
-
The model to run the query from
- $queries : array<string|int, mixed>
-
An array of SQL statements to execute
processCli()
Process CLI installation
private
processCli() : mixed
setupAccountCli()
Handle the initial staff account creation
private
setupAccountCli() : mixed
systemRequirementsCli()
Handle system requirements check
private
systemRequirementsCli() : mixed
tmpDir()
Determine the location of the temp directory on this system
private
tmpDir() : mixed
writeConfig()
Write the config file details
private
writeConfig() : false
Return values
false —If the file could not be renamed (e.g. written to)