Elgg
Version 1.11
|
Public Member Functions | |
__construct () | |
Constructor bootstraps the Elgg engine. More... | |
run ($step) | |
Dispatches a request to one of the step controllers. More... | |
setAutoLogin ($flag) | |
Set the auto login flag. More... | |
batchInstall (array $params, $createHtaccess=FALSE) | |
A batch install of Elgg. More... | |
Protected Member Functions | |
render ($step, $vars=array()) | |
Renders the data passed by a controller. More... | |
welcome ($vars) | |
Step controllers. More... | |
requirements ($vars) | |
Requirements controller. More... | |
database ($submissionVars) | |
Database set up controller. More... | |
settings ($submissionVars) | |
Site settings controller. More... | |
admin ($submissionVars) | |
Admin account controller. More... | |
complete () | |
Controller for last step. More... | |
getSteps () | |
Step management. More... | |
continueToNextStep ($currentStep) | |
Forwards the browser to the next step. More... | |
getNextStep ($currentStep) | |
Get the next step as a string. More... | |
getNextStepUrl ($currentStep) | |
Get the URL of the next step. More... | |
setInstallStatus () | |
Check the different install steps for completion. More... | |
checkInstallCompletion ($step) | |
Security check to ensure the installer cannot be run after installation has finished. More... | |
resumeInstall ($step) | |
Check if this is a case of a install being resumed and figure out where to continue from. More... | |
bootstrapEngine () | |
Bootstraping. More... | |
finishBootstraping ($step) | |
Load remaining engine libraries and complete bootstraping (see start.php) More... | |
bootstrapConfig () | |
Set up configuration variables. More... | |
getBaseUrl () | |
Get the best guess at the base URL. More... | |
loadSettingsFile () | |
Load settings.php. More... | |
getPostVariables () | |
Action handling methods. More... | |
makeFormSticky ($formVars, $submissionVars) | |
If form is reshown, remember previously submitted variables. More... | |
checkEngineDir (&$report) | |
Requirement checks support methods. More... | |
checkSettingsFile (&$report=array()) | |
Check that the settings file exists. More... | |
checkPHP (&$report) | |
Check version of PHP, extensions, and variables. More... | |
checkPhpExtensions (&$phpReport) | |
Check the server's PHP extensions. More... | |
checkPhpDirectives (&$phpReport) | |
Check PHP parameters. More... | |
checkRewriteRules (&$report) | |
Confirm that the rewrite rules are firing. More... | |
processRewriteTest () | |
Check if the request is coming from the URL rewrite test on the requirements page. More... | |
countNumConditions ($report, $condition) | |
Count the number of failures in the requirements report. More... | |
validateDatabaseVars ($submissionVars, $formVars) | |
Database support methods. More... | |
checkDatabaseSettings ($user, $password, $dbname, $host) | |
Confirm the settings for the database. More... | |
createSettingsFile ($params) | |
Writes the settings file to the engine directory. More... | |
connectToDatabase () | |
Bootstrap database connection before entire engine is available. More... | |
installDatabase () | |
Create the database tables. More... | |
createDataDirectory (&$submissionVars, $formVars) | |
Site settings support methods. More... | |
validateSettingsVars ($submissionVars, $formVars) | |
Validate the site settings form variables. More... | |
saveSiteSettings ($submissionVars) | |
Initialize the site including site entity, plugins, and configuration. More... | |
setSubtypeClasses () | |
Register classes for core objects. More... | |
enablePlugins () | |
Enable a set of default plugins. More... | |
validateAdminVars ($submissionVars, $formVars) | |
Admin account support methods. More... | |
createAdminAccount ($submissionVars, $login=FALSE) | |
Create a user account for the admin. More... | |
Protected Attributes | |
$steps | |
$status | |
$isAction = FALSE | |
$autoLogin = TRUE | |
Definition at line 30 of file ElggInstaller.php.
ElggInstaller::__construct | ( | ) |
Constructor bootstraps the Elgg engine.
Definition at line 62 of file ElggInstaller.php.
|
protected |
Admin account controller.
Creates an admin user account
array | $submissionVars | Submitted vars |
Definition at line 485 of file ElggInstaller.php.
ElggInstaller::batchInstall | ( | array | $params, |
$createHtaccess = FALSE |
|||
) |
A batch install of Elgg.
All required parameters must be passed in as an associative array. See $requiredParams for a list of them. This creates the necessary files, loads the database, configures the site settings, and creates the admin account. If it fails, an exception is thrown. It does not check any of the requirements as the multiple step web installer does.
If the settings.php file exists, it will use that rather than the parameters passed to this function.
array | $params | Array of key value pairs |
bool | $createHtaccess | Should .htaccess be created |
InstallationException |
Definition at line 157 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstraping.
Load the essential libraries of the engine
Definition at line 739 of file ElggInstaller.php.
|
protected |
Confirm the settings for the database.
string | $user | Username |
string | $password | Password |
string | $dbname | Database name |
string | $host | Host |
Definition at line 1218 of file ElggInstaller.php.
|
protected |
Requirement checks support methods.
Check that the engine dir is writable
array | &$report | The requirements report object |
Definition at line 960 of file ElggInstaller.php.
|
protected |
Security check to ensure the installer cannot be run after installation has finished.
If this is detected, the viewer is sent to the front page.
string | $step | Installation step to check against |
Definition at line 691 of file ElggInstaller.php.
|
protected |
Check version of PHP, extensions, and variables.
array | &$report | The requirements report array |
Definition at line 1010 of file ElggInstaller.php.
|
protected |
Check PHP parameters.
array | &$phpReport | The PHP requirements report array |
Definition at line 1079 of file ElggInstaller.php.
|
protected |
Check the server's PHP extensions.
array | &$phpReport | The PHP requirements report array |
Definition at line 1042 of file ElggInstaller.php.
|
protected |
Confirm that the rewrite rules are firing.
array | &$report | The requirements report array |
Definition at line 1125 of file ElggInstaller.php.
|
protected |
Check that the settings file exists.
array | &$report | The requirements report array |
Definition at line 984 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstrap database connection before entire engine is available.
Definition at line 1287 of file ElggInstaller.php.
|
protected |
Forwards the browser to the next step.
string | $currentStep | Current installation step |
Definition at line 581 of file ElggInstaller.php.
|
protected |
Count the number of failures in the requirements report.
array | $report | The requirements report array |
string | $condition | 'failure' or 'warning' |
Definition at line 1154 of file ElggInstaller.php.
|
protected |
Create a user account for the admin.
array | $submissionVars | Submitted vars |
bool | $login | Login in the admin user? |
Definition at line 1591 of file ElggInstaller.php.
|
protected |
Site settings support methods.
Create the data directory if requested
array | &$submissionVars | Submitted vars |
array | $formVars | Variables in the form |
Definition at line 1344 of file ElggInstaller.php.
|
protected |
Writes the settings file to the engine directory.
array | $params | Array of inputted params from the user |
Definition at line 1258 of file ElggInstaller.php.
|
protected |
Database set up controller.
Creates the settings.php file and creates the database tables
array | $submissionVars | Submitted form variables |
Definition at line 327 of file ElggInstaller.php.
|
protected |
|
protected |
Load remaining engine libraries and complete bootstraping (see start.php)
string | $step | Which step to boot strap for. Required because boot strapping is different until the DB is populated. |
InstallationException |
Definition at line 754 of file ElggInstaller.php.
|
protected |
Get the best guess at the base URL.
Definition at line 880 of file ElggInstaller.php.
|
protected |
Get the next step as a string.
string | $currentStep | Current installation step |
Definition at line 593 of file ElggInstaller.php.
|
protected |
Get the URL of the next step.
string | $currentStep | Current installation step |
Definition at line 609 of file ElggInstaller.php.
|
protected |
Action handling methods.
Return an associative array of post variables (could be selective based on expected variables)
Does not filter as person installing the site should not be attempting XSS attacks. If filtering is added, it should not be done for passwords.
Definition at line 926 of file ElggInstaller.php.
|
protected |
Step management.
Get an array of steps
Definition at line 570 of file ElggInstaller.php.
|
protected |
|
protected |
Load settings.php.
InstallationException |
Definition at line 905 of file ElggInstaller.php.
|
protected |
If form is reshown, remember previously submitted variables.
array | $formVars | Vars int he form |
array | $submissionVars | Submitted vars |
Definition at line 942 of file ElggInstaller.php.
|
protected |
Check if the request is coming from the URL rewrite test on the requirements page.
Definition at line 1139 of file ElggInstaller.php.
|
protected |
Renders the data passed by a controller.
string | $step | The current step |
array | $vars | Array of vars to pass to the view |
Definition at line 238 of file ElggInstaller.php.
|
protected |
Requirements controller.
Checks version of php, libraries, permissions, and rewrite rules
array | $vars | Vars |
Definition at line 280 of file ElggInstaller.php.
|
protected |
Check if this is a case of a install being resumed and figure out where to continue from.
Returns the best guess on the step.
string | $step | Installation step to resume from |
Definition at line 708 of file ElggInstaller.php.
ElggInstaller::run | ( | $step | ) |
Dispatches a request to one of the step controllers.
string | $step | The installation step to run |
InstallationException |
Definition at line 101 of file ElggInstaller.php.
|
protected |
Initialize the site including site entity, plugins, and configuration.
array | $submissionVars | Submitted vars |
Definition at line 1448 of file ElggInstaller.php.
ElggInstaller::setAutoLogin | ( | $flag | ) |
Set the auto login flag.
bool | $flag | Auto login |
Definition at line 135 of file ElggInstaller.php.
|
protected |
Check the different install steps for completion.
InstallationException |
Definition at line 620 of file ElggInstaller.php.
|
protected |
|
protected |
Site settings controller.
Sets the site name, URL, data directory, etc.
array | $submissionVars | Submitted vars |
Definition at line 412 of file ElggInstaller.php.
|
protected |
Admin account support methods.
Validate account form variables
array | $submissionVars | Submitted vars |
array | $formVars | Form vars |
Definition at line 1547 of file ElggInstaller.php.
|
protected |
Database support methods.
Validate the variables for the database step
array | $submissionVars | Submitted vars |
array | $formVars | Vars in the form |
Definition at line 1180 of file ElggInstaller.php.
|
protected |
Validate the site settings form variables.
array | $submissionVars | Submitted vars |
array | $formVars | Vars in the form |
Definition at line 1378 of file ElggInstaller.php.
|
protected |
Step controllers.
Welcome controller
array | $vars | Not used |
Definition at line 267 of file ElggInstaller.php.
|
protected |
Definition at line 50 of file ElggInstaller.php.
|
protected |
Definition at line 48 of file ElggInstaller.php.
|
protected |
Definition at line 41 of file ElggInstaller.php.
|
protected |
Definition at line 32 of file ElggInstaller.php.