Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3281966
ArcanistRuntimeConfigurationSource.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistRuntimeConfigurationSource.php
View Options
<?php
final
class
ArcanistRuntimeConfigurationSource
extends
ArcanistDictionaryConfigurationSource
{
public
function
__construct
(
array
$argv
)
{
$map
=
array
(
)
;
foreach
(
$argv
as
$raw
)
{
$parts
=
explode
(
'='
,
$raw
,
2
)
;
if
(
count
(
$parts
)
!==
2
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Configuration option "%s" is not valid. Configuration options '
.
'passed with command line flags must be in the form "name=value".'
,
$raw
)
)
;
}
list
(
$key
,
$value
)
=
$parts
;
if
(
isset
(
$map
[
$key
]
)
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Configuration option "%s" was provided multiple times with '
.
'"--config" flags. Specify each option no more than once.'
,
$key
)
)
;
}
$map
[
$key
]
=
$value
;
}
parent
::
__construct
(
$map
)
;
}
public
function
didReadUnknownOption
(
ArcanistRuntime
$runtime
,
$key
)
{
throw
new
PhutilArgumentUsageException
(
pht
(
'Configuration option ("%s") specified with "--config" flag is not '
.
'a recognized option.'
,
$key
)
)
;
}
public
function
getSourceDisplayName
(
)
{
return
pht
(
'Runtime "--config" Flags'
)
;
}
public
function
isStringSource
(
)
{
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 03:05 (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1117843
Default Alt Text
ArcanistRuntimeConfigurationSource.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment