class ArgumentScaffolder implements ConfigurationApplier (View source)

Properties

string $argName

Methods

__construct(string $argName, string $typeStr)

ArgumentScaffolder constructor

$this
setRequired(bool $bool)

Sets the argument as required

$this
setDescription(string $description)

Sets the argument description

$this
setDefaultValue(mixed $value)

Sets the default value of the argument

string
getDescription()

No description

mixed
getDefaultValue()

No description

bool
isRequired()

No description

applyConfig(array $config)

Applies an array of configuration to the scaffolder

array
toArray(Manager $manager = null)

Creates an array suitable for a map of args in a field

Details

__construct(string $argName, string $typeStr)

ArgumentScaffolder constructor

Parameters

string $argName

Name of the argument

string $typeStr

A string describing the type (see TypeParser)

$this setRequired(bool $bool)

Sets the argument as required

Parameters

bool $bool

Return Value

$this

$this setDescription(string $description)

Sets the argument description

Parameters

string $description

Return Value

$this

$this setDefaultValue(mixed $value)

Sets the default value of the argument

Parameters

mixed $value

Return Value

$this

string getDescription()

Return Value

string

mixed getDefaultValue()

Return Value

mixed

bool isRequired()

Return Value

bool

applyConfig(array $config)

Applies an array of configuration to the scaffolder

Parameters

array $config

array toArray(Manager $manager = null)

Creates an array suitable for a map of args in a field

Parameters

Manager $manager

Return Value

array