# ArgumentsInterface

Chevere\Interfaces\Parameter\ArgumentsInterface

view source (opens new window)

# Extends

# Description

Describes the component in charge of defining a set of parameters with arguments.

# Methods

# __construct

Parameters

Throws


# parameters

Provides access to the parameters instance.


# toArray

Provides access to the controller arguments as array.

Return

array

return [
    'parameterName' => 'argument',
];

# withArgument

Return an instance with the specified controller argument.

Parameters

  • name: string
  • value:

Throws

  • ⚠ Unknown type ArgumentValueRegexMatchException declared in @throws tag`
  • OutOfBoundsException If $name is not a known controller parameter.

Return

self

This method MUST retain the state of the current instance, and return an instance that contains the specified controller argument.


# has

Indicates whether the instance has an argument for the parameter $name.

Parameters

  • name: string

Return

bool


# get

Provides access to the argument value for the parameter $name.

Parameters

  • name: string

Return

void


# getBoolean

Provides access to the argument value for the parameter $boolean type-hinted as boolean.

Parameters

  • name: string

Return

bool


# getString

Provides access to the argument value for the parameter $string type-hinted as string.

Parameters

  • name: string

Return

string


# getInteger

Provides access to the argument value for the parameter $integer type-hinted as integer.

Parameters

  • name: string

Return

int


# getFloat

Provides access to the argument value for the parameter $float type-hinted as float.

Parameters

  • name: string

Return

float


# getArray

Provides access to the argument value for the parameter $array type-hinted as array.

Parameters

  • name: string

Return

array


Last Updated: 5/1/2021, 2:31:10 PM