You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to check if an argument is defined. I need to distinguish between the default value, which is valid to be passed manually, and the argument not being defined at all.
I'm aware of the Manager::defined() method, but that requires reparsing $argv and in my particular use case, $argv isn't even available in this section of code.
What I'd like is something like $climate->arguments->provided( $name ). Though that might be a bit confusing with exists and defined already available on that object. Having it only accessible on the Argument object would work too I think.
The method would check if Argument::$values is non-empty.
Happy to PR if you think this is workable.
The text was updated successfully, but these errors were encountered:
I'm trying to check if an argument is defined. I need to distinguish between the default value, which is valid to be passed manually, and the argument not being defined at all.
I'm aware of the
Manager::defined()
method, but that requires reparsing$argv
and in my particular use case,$argv
isn't even available in this section of code.What I'd like is something like
$climate->arguments->provided( $name )
. Though that might be a bit confusing withexists
anddefined
already available on that object. Having it only accessible on theArgument
object would work too I think.The method would check if
Argument::$values
is non-empty.Happy to PR if you think this is workable.
The text was updated successfully, but these errors were encountered: