Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
12804ee0
Commit
12804ee0
authored
May 08, 2010
by
Neil Drumm
Committed by
Neil Drumm
May 08, 2010
Browse files
Don't hard code service types.
parent
e3813c3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
platform/provision_drupal.drush.inc
View file @
12804ee0
...
...
@@ -86,11 +86,11 @@ function _provision_context_init() {
drush_log
(
dt
(
'Using context @context'
,
array
(
'@context'
=>
$context
)));
// Initialize services.
foreach
(
array
(
'db'
,
'http'
)
as
$servic
e
)
{
if
(
!
is_null
(
drush_get_option
(
'provision-service-'
.
$service
)
))
{
include_once
dirname
(
__FILE__
)
.
'/../'
.
$
service
.
'/'
.
drush_get_option
(
'provision-service-'
.
$service
)
.
'/'
.
drush_get_option
(
'provision-service-'
.
$service
)
.
'_service.inc'
;
$class
=
'provisionService_'
.
$
service
.
'_'
.
drush_get_option
(
'provision-service-'
.
$service
)
;
provision_service
(
$
service
,
new
$class
());
foreach
(
drush_get_merged_options
()
as
$option
=>
$valu
e
)
{
if
(
preg_match
(
'/^provision-service-([a-z]*)/'
,
$option
,
$match
))
{
include_once
dirname
(
__FILE__
)
.
'/../'
.
$
match
[
1
]
.
'/'
.
$value
.
'/'
.
$value
.
'_service.inc'
;
$class
=
'provisionService_'
.
$
match
[
1
]
.
'_'
.
$value
;
provision_service
(
$
match
[
1
]
,
new
$class
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment