Elgg
Version 1.9
|
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 55 of file ElggInstaller.php.
|
protected |
Admin account controller.
Creates an admin user account
array | $submissionVars | Submitted vars |
Definition at line 473 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 139 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstraping.
Load the essential libraries of the engine
Definition at line 727 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 1230 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 972 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 679 of file ElggInstaller.php.
|
protected |
Check version of PHP, extensions, and variables.
array | &$report | The requirements report array |
Definition at line 1022 of file ElggInstaller.php.
|
protected |
Check PHP parameters.
array | &$phpReport | The PHP requirements report array |
Definition at line 1091 of file ElggInstaller.php.
|
protected |
Check the server's PHP extensions.
array | &$phpReport | The PHP requirements report array |
Definition at line 1054 of file ElggInstaller.php.
|
protected |
Confirm that the rewrite rules are firing.
array | &$report | The requirements report array |
Definition at line 1137 of file ElggInstaller.php.
|
protected |
Check that the settings file exists.
array | &$report | The requirements report array |
Definition at line 996 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstrap database connection before entire engine is available.
Definition at line 1293 of file ElggInstaller.php.
|
protected |
Forwards the browser to the next step.
string | $currentStep | Current installation step |
Definition at line 569 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 1166 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 1594 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 1349 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 1264 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 310 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 768 of file ElggInstaller.php.
|
protected |
Get the best guess at the base URL.
Definition at line 892 of file ElggInstaller.php.
|
protected |
Get the next step as a string.
string | $currentStep | Current installation step |
Definition at line 581 of file ElggInstaller.php.
|
protected |
Get the URL of the next step.
string | $currentStep | Current installation step |
Definition at line 597 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 938 of file ElggInstaller.php.
|
protected |
Step management.
Get an array of steps
Definition at line 558 of file ElggInstaller.php.
|
protected |
|
protected |
Load settings.php.
InstallationException |
Definition at line 917 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 954 of file ElggInstaller.php.
|
protected |
Check if the request is coming from the URL rewrite test on the requirements page.
Definition at line 1151 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 221 of file ElggInstaller.php.
|
protected |
Requirements controller.
Checks version of php, libraries, permissions, and rewrite rules
array | $vars | Vars |
Definition at line 263 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 696 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 83 of file ElggInstaller.php.
|
protected |
Initialize the site including site entity, plugins, and configuration.
array | $submissionVars | Submitted vars |
Definition at line 1453 of file ElggInstaller.php.
ElggInstaller::setAutoLogin | ( | $flag | ) |
Set the auto login flag.
bool | $flag | Auto login |
Definition at line 117 of file ElggInstaller.php.
|
protected |
Check the different install steps for completion.
InstallationException |
Definition at line 608 of file ElggInstaller.php.
|
protected |
|
protected |
Site settings controller.
Sets the site name, URL, data directory, etc.
array | $submissionVars | Submitted vars |
Definition at line 395 of file ElggInstaller.php.
|
protected |
Admin account support methods.
Validate account form variables
array | $submissionVars | Submitted vars |
array | $formVars | Form vars |
Definition at line 1550 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 1192 of file ElggInstaller.php.
|
protected |
Validate the site settings form variables.
array | $submissionVars | Submitted vars |
array | $formVars | Vars in the form |
Definition at line 1383 of file ElggInstaller.php.
|
protected |
Step controllers.
Welcome controller
array | $vars | Not used |
Definition at line 250 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.