Elgg
Version 2.3
|
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... | |
isInstallDirWritable (&$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 32 of file ElggInstaller.php.
ElggInstaller::__construct | ( | ) |
Constructor bootstraps the Elgg engine.
Definition at line 66 of file ElggInstaller.php.
|
protected |
Admin account controller.
Creates an admin user account
array | $submissionVars | Submitted vars |
Definition at line 499 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 164 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstraping.
Load the essential libraries of the engine
Definition at line 760 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 1253 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 712 of file ElggInstaller.php.
|
protected |
Check version of PHP, extensions, and variables.
array | &$report | The requirements report array |
Definition at line 1045 of file ElggInstaller.php.
|
protected |
Check PHP parameters.
array | &$phpReport | The PHP requirements report array |
Definition at line 1114 of file ElggInstaller.php.
|
protected |
Check the server's PHP extensions.
array | &$phpReport | The PHP requirements report array |
Definition at line 1077 of file ElggInstaller.php.
|
protected |
Confirm that the rewrite rules are firing.
array | &$report | The requirements report array |
Definition at line 1160 of file ElggInstaller.php.
|
protected |
Check that the settings file exists.
array | &$report | The requirements report array |
Definition at line 1012 of file ElggInstaller.php.
|
protected |
|
protected |
Bootstrap database connection before entire engine is available.
Definition at line 1317 of file ElggInstaller.php.
|
protected |
Forwards the browser to the next step.
string | $currentStep | Current installation step |
Definition at line 595 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 1189 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 1616 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 1372 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 1292 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 335 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 775 of file ElggInstaller.php.
|
protected |
Get the best guess at the base URL.
Definition at line 899 of file ElggInstaller.php.
|
protected |
Get the next step as a string.
string | $currentStep | Current installation step |
Definition at line 607 of file ElggInstaller.php.
|
protected |
Get the URL of the next step.
string | $currentStep | Current installation step |
Definition at line 623 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 946 of file ElggInstaller.php.
|
protected |
Step management.
Get an array of steps
Definition at line 584 of file ElggInstaller.php.
|
protected |
|
protected |
Requirement checks support methods.
Indicates whether the webserver can add settings.php on its own or not.
array | &$report | The requirements report object |
Definition at line 980 of file ElggInstaller.php.
|
protected |
Load settings.php.
InstallationException |
Definition at line 924 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 962 of file ElggInstaller.php.
|
protected |
Check if the request is coming from the URL rewrite test on the requirements page.
Definition at line 1174 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 246 of file ElggInstaller.php.
|
protected |
Requirements controller.
Checks version of php, libraries, permissions, and rewrite rules
array | $vars | Vars |
Definition at line 288 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 729 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 107 of file ElggInstaller.php.
|
protected |
Initialize the site including site entity, plugins, and configuration.
array | $submissionVars | Submitted vars |
Definition at line 1476 of file ElggInstaller.php.
ElggInstaller::setAutoLogin | ( | $flag | ) |
Set the auto login flag.
bool | $flag | Auto login |
Definition at line 142 of file ElggInstaller.php.
|
protected |
Check the different install steps for completion.
InstallationException |
Definition at line 634 of file ElggInstaller.php.
|
protected |
|
protected |
Site settings controller.
Sets the site name, URL, data directory, etc.
array | $submissionVars | Submitted vars |
Definition at line 426 of file ElggInstaller.php.
|
protected |
Admin account support methods.
Validate account form variables
array | $submissionVars | Submitted vars |
array | $formVars | Form vars |
Definition at line 1572 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 1215 of file ElggInstaller.php.
|
protected |
Validate the site settings form variables.
array | $submissionVars | Submitted vars |
array | $formVars | Vars in the form |
Definition at line 1406 of file ElggInstaller.php.
|
protected |
Step controllers.
Welcome controller
array | $vars | Not used |
Definition at line 275 of file ElggInstaller.php.
|
protected |
Definition at line 52 of file ElggInstaller.php.
|
protected |
Definition at line 50 of file ElggInstaller.php.
|
protected |
Definition at line 43 of file ElggInstaller.php.
|
protected |
Definition at line 34 of file ElggInstaller.php.