Example #1
0
 /**
  * Migrate steps helper
  *
  * @author KnowledgeTree Team
  * @param none
  * @access private
  * @return void
  */
 private function _migrateHelper($className)
 {
     $stepAction = new stepAction($className);
     // Instantiate a step action
     $class = $stepAction->createStep();
     // Get step class
     if ($class) {
         // Check if class Exists
         if ($class->runMigrate()) {
             // Check if step needs to be migrated
             $class->setDataFromSession($className);
             // Set Session Information
             $class->setPostConfig();
             // Set any posted variables
             $class->migrateStep();
             // Run migrate step
         }
     } else {
         $util = new MigrateUtil();
         $util->error("Class File Missing in Step Directory: {$className}");
         exit;
     }
 }
Example #2
0
 /**
  * Install steps helper
  *
  * @author KnowledgeTree Team
  * @param none
  * @access private
  * @return void
  */
 private function _installHelper($className)
 {
     $stepAction = new stepAction($className);
     // Instantiate a step action
     $class = $stepAction->createStep();
     // Get step class
     if ($class) {
         // Check if class Exists
         if ($class->runInstall()) {
             // Check if step needs to be installed
             $class->setDataFromSession($className);
             // Set Session Information
             $class->setPostConfig();
             // Set any posted variables
             $response = $class->installStep();
             // Run install step
             // TODO : Break on error response
         }
     } else {
         $iutil = new InstallUtil();
         $iutil->error("Class File Missing in Step Directory: {$className}");
         exit;
     }
 }