\*=====================================================================*/
/**
-* Installer creator (Install.php)
-*
-* @package ISSO
-*/
+ * Installer creator (Install.php)
+ *
+ * @package ISSO
+ */
/**
-* Installer
-*
-* Installer modules should extend this class. In the install module router,
-* instantiate the right module. Methods beginning with step*() will be executed
-* in numerical order.
-*
-* @author Blue Static
-* @copyright Copyright (c)2005 - 2008, Blue Static
-* @package ISSO
-*
-*/
+ * Installer
+ *
+ * Installer modules should extend this class. In the install module router,
+ * instantiate the right module. Methods beginning with step*() will be executed
+ * in numerical order.
+ *
+ * @author Blue Static
+ * @copyright Copyright (c)2005 - 2008, Blue Static
+ * @package ISSO
+ *
+ */
abstract class BSInstaller
{
/**
- * All the method steps
- * @var array
- */
+ * All the method steps
+ * @var array
+ */
private $steps = array();
/**
- * The file name of this module
- * @var string
- */
+ * The file name of this module
+ * @var string
+ */
protected $fileName;
/**
- * Constructor: set up the steps
- *
- * @param string The file name for this module
- */
+ * Constructor: set up the steps
+ *
+ * @param string The file name for this module
+ */
public function __construct($fileName)
{
$this->fileName = $fileName;
$this->_runStep(BSApp::$input->inputClean('step', TYPE_UINT));
}
- // ###################################################################
/**
- * An abstract method that needs to be overridden by a subclass that
- * populates the page title
- *
- * @return string Returns the page title
- */
+ * An abstract method that needs to be overridden by a subclass that
+ * populates the page title
+ *
+ * @return string Returns the page title
+ */
protected abstract function _pageTitle();
- // ###################################################################
/**
- * Abstract method that will return link to the page after all the
- * steps are completed. This needs to provide it's own <a>
- *
- * @return string Final page link
- */
+ * Abstract method that will return link to the page after all the
+ * steps are completed. This needs to provide it's own <a>
+ *
+ * @return string Final page link
+ */
protected abstract function _finalLink();
- // ###################################################################
/**
- * Abstract method that prints out the first welcome screen that the
- * user sees when no step has been selected
- */
+ * Abstract method that prints out the first welcome screen that the
+ * user sees when no step has been selected
+ */
protected abstract function _welcomePage();
- // ###################################################################
/**
- * Prints out the page header... you really don't do this more than
- * once
- */
+ * Prints out the page header... you really don't do this more than
+ * once
+ */
protected function _setUp()
{
?>
<?php
}
- // ###################################################################
/**
- * Runs the specific step method; if it does not exist, it will throw
- * an error
- *
- * @param integer Step number
- */
+ * Runs the specific step method; if it does not exist, it will throw
+ * an error
+ *
+ * @param integer Step number
+ */
protected function _runStep($step)
{
if ($step == 0)
}
}
- // ###################################################################
/**
- * Prints out the footer part of the page, and the appropriate forwarding
- * action button
- *
- * @param integer Step number
- */
+ * Prints out the footer part of the page, and the appropriate forwarding
+ * action button
+ *
+ * @param integer Step number
+ */
protected function _setDown($step)
{
// this is the last step, print the final button