Class StartupCheck

Description
  • version: $Id: StartupCheck.class.php,v 1.12 2007/09/19 14:04:49 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /polyphony/main/library/StartupCheck/StartupCheck.class.php (line 69)


	
			
Variable Summary
Method Summary
StartupCheck StartupCheck ()
void addRequirement (string $name, ref $requirement)
boolean areAllOK ()
void error (mixed $string)
integer getRequirementCount ()
array getRequirementsOfStatus (mixed $status)
integer getStatus (string $name)
boolean handleAllUpdates ()
boolean updateRequirement (string $name)
boolean updateRequirementWithWizard (string $name, ref $wizard)
void _useWizard (ref $harmoni)
Variables
string $_currentRequirement (line 87)
  • var: The name of the requirement we are in the middle of configuring (with user input).
  • access: private
object $_currentWizard (line 93)
  • var: The Wizard object associated with the $_currentRequirement.
  • access: private
array $_requirements (line 81)
  • var: An array of StartupRequirements.
  • access: private
array $_status (line 75)
  • var: Keeps a record of what parts of the program need updating.
  • access: private
Methods
Constructor StartupCheck (line 96)
StartupCheck StartupCheck ()
addRequirement (line 108)

Adds a StartupRequirement to the requirement list.

  • access: public
void addRequirement (string $name, ref $requirement)
  • string $name: A short name describing this component, such as "db tables".
  • ref $requirement: object $requirement A StartupRequirement to add.
areAllOK (line 327)

Returns true if all requirements have been met (and checked, of course).

  • access: public
boolean areAllOK ()
checkAllRequirements (line 119)

Runs through all the requirements and asks their status.

  • return: FALSE if an update is needed, TRUE if everything is a-OK.
  • access: public
boolean checkAllRequirements ()
error (line 350)

This function prints out an error message to tell the user that something went wrong in the startup check process.

  • static:
  • access: private
void error (mixed $string)
getNextRequiringInput (line 337)

Gets the next requirement that requires user input and returns the name.

  • return: or NULL if none are left.
  • access: public
string getNextRequiringInput ()
getRequirementCount (line 226)

Returns the number of requirements we have to meet.

  • access: public
integer getRequirementCount ()
getRequirementsOfStatus (line 173)

Returns an array of the names of requirements that currently have the status requested.

  • access: public
array getRequirementsOfStatus (mixed $status)
getStatus (line 144)

Returns the current status of the named requirement.

  • return: One of the STARTUP_STATUS_* values.
  • access: public
integer getStatus (string $name)
  • string $name: The component name to check.
handleAllUpdates (line 237)

Handles the update process with user input, if necessary. Uses the Harmoni object to output HTML to the end user.

In order for this to work, we must be session_registered and called every page-load.

  • return: TRUE if program execution can continue as normal, FALSE if updating is still required.
  • access: public
boolean handleAllUpdates ()
updateAllAutonomousRequirements (line 154)

Tells each requirement class to update those components necessary to be met, if it can be done so without user interaction.

  • return: FALSE if an error occurs.
  • access: public
boolean updateAllAutonomousRequirements ()
updateRequirement (line 188)

Tells a specific named requirement to update necessary components without user input.

  • return: FALSE if error occurs.
  • access: public
boolean updateRequirement (string $name)
  • string $name: The short name of the requirement.
updateRequirementWithWizard (line 207)

Tells a specific named requirement to update necessary components using the WizardProperty objects supplied by the given Wizard.

  • return: FALSE if error occurs.
  • access: public
boolean updateRequirementWithWizard (string $name, ref $wizard)
  • string $name: The short-name of the requirement to update.
  • ref $wizard: object $wizard A Wizard object.
_setupNextRequirementForInput (line 310)

Sets up the next requirement wizard for user input.

  • access: private
void _setupNextRequirementForInput ()
_useWizard (line 283)

Internally handles input & output from a wizard.

  • access: private
void _useWizard (ref $harmoni)
  • ref $harmoni: object $harmoni A Harmoni object.

Documentation generated on Wed, 19 Sep 2007 10:26:41 -0400 by phpDocumentor 1.3.0RC3