Example #1
0
 public function __construct($rum)
 {
     parent::__construct($rum);
     $this->drush = new Drush();
     $settings = $this->drush->getSettings();
     foreach ($settings as $setting) {
         $this->checkSetting($setting);
     }
 }
Example #2
0
 public function __construct($rum, $type)
 {
     parent::__construct($rum);
     switch ($type) {
         case self::RUM_STATE_SVN:
         case self::RUM_STATE_GIT:
             $this->state = State::getInstance($type);
             break;
         default:
             throw new RumClassTypeNotFound($type);
     }
 }
Example #3
0
 public function checkSetting($setting)
 {
     $result = parent::checkSetting($setting);
     // Extra check to make sure the hosts file *does* exist
     if ($result) {
         $this->file_system = new FileSystem();
         $hosts_file = drush_get_option('rum-hosts-file', '');
         if ($this->file_system->checkFile($hosts_file)) {
             return TRUE;
         } else {
             throw new RumHostsFileDoesNotExist($hosts_file);
         }
     }
     return FALSE;
 }
Example #4
0
 public function __construct($rum)
 {
     parent::__construct($rum);
     $core_version = $this->getCoreVersion();
     switch ($core_version) {
         case RUM_CORE_VERSION_6:
             $class_name = 'SettingsVersion6';
             break;
         case RUM_CORE_VERSION_7:
             $class_name = 'SettingsVersion7';
             break;
     }
     $this->settings_generator = Settings::getInstance($class_name);
     $this->file_system = new FileSystem();
 }
Example #5
0
 function __construct($rum)
 {
     parent::__construct($rum);
     $this->checkSetting('rum-http-type');
     $class_name = drush_get_option('rum-http-type', '');
     $this->file_system = new FileSystem();
     switch ($class_name) {
         case self::RUM_HTTP_APACHE:
         case self::RUM_HTTP_NGINX:
             $this->web_server = WebServer::getInstance($class_name);
             break;
         default:
             throw new RumClassTypeNotFound($class_name, 'Webserver');
     }
     $settings = array('rum-http-port', 'rum-http-doc-root');
     $settings += $this->web_server->getSettings();
     foreach ($settings as $setting) {
         $this->checkSetting($setting);
     }
 }
Example #6
0
 public function __construct($rum)
 {
     parent::__construct($rum);
     $this->checkSetting('rum-db-type');
     $class_name = drush_get_option('rum-db-type', '');
     switch ($class_name) {
         case self::RUM_DB_MYSQL:
             $this->db_server = Database::getInstance($class_name);
             break;
         default:
             throw new RumClassTypeNotFound($class_name, 'Database');
     }
     $settings = $this->db_server->getSettings();
     $settings += array('rum-db-root-user', 'rum-db-root-pass');
     foreach ($settings as $setting) {
         $this->checkSetting($setting);
     }
     $db_root_user = drush_get_option('rum-db-root-user', '');
     $db_root_pass = drush_get_option('rum-db-root-pass', '');
     $this->db_server->setRootUser($db_root_user, $db_root_pass);
 }
Example #7
0
 public function __construct($rum)
 {
     parent::__construct($rum);
 }
Example #8
0
 public function __construct($rum)
 {
     parent::__construct($rum);
     $this->file_system = new FileSystem();
 }