# ArgumentsInterface

Chevere\Interfaces\Parameter\ArgumentsInterface

view source

# Extends

# Description

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

# Methods

# __construct()

# Parameters

  1. ParametersInterface $parameters
  2. mixed ...$namedArguments

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

  1. string $name
  2. $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

  1. string $name

RETURN

bool


# get()

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

# Parameters

  1. string $name

RETURN

void


# getBoolean()

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

# Parameters

  1. string $boolean

RETURN

bool


# getString()

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

# Parameters

  1. string $string

RETURN

string


# getInteger()

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

# Parameters

  1. string $integer

RETURN

int


# getFloat()

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

# Parameters

  1. string $float

RETURN

float


# getArray()

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

# Parameters

  1. string $array

RETURN

array


Last Updated: 1/16/2021, 9:23:54 PM