public function __construct($rum) { parent::__construct($rum); $this->drush = new Drush(); $settings = $this->drush->getSettings(); foreach ($settings as $setting) { $this->checkSetting($setting); } }
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); } }
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; }
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(); }
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); } }
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); }
public function __construct($rum) { parent::__construct($rum); }
public function __construct($rum) { parent::__construct($rum); $this->file_system = new FileSystem(); }