PHP Trait Flugg\Responder\Traits\ConvertsParameters

Author: Alexander Tømmerås ([email protected])
Datei anzeigen Open project: flugger/laravel-responder

Public Methods

Method Description
__get ( string $key ) : mixed Get an input element from the request.
__isset ( string $key ) : boolean Check if an input element is set on the request.
all ( ) : array Get all of the input and files for the request.

Protected Methods

Method Description
castBooleans ( mixed $input ) : array Cast all string booleans to real boolean values.
castToBooleanIsDisabled ( ) : boolean Checks if the user wants to cast to booleans.
castValueToBoolean ( mixed $value ) : mixed Cast a given value to a boolean if it is in fact a boolean.
convertArrayToSnakeCase ( array $input ) : array Convert all keys of an array to snake case.
convertToSnakeCase ( mixed $input ) : mixed Convert a string or array to snake case.
convertToSnakeCaseIsDisabled ( ) : boolean Checks if the user wants to convert to snake case.
getConvertedParameters ( ) : array Cast and convert parameters.
getInputSource ( ) : Symfony\Component\HttpFoundation\ParameterBag Get the input source for the request.
getValidatorInstance ( ) : Illuminate\Contracts\Validation\Validator Get the validator instance for the request.

Method Details

__get() public method

Get an input element from the request.
public __get ( string $key ) : mixed
$key string
return mixed

__isset() public method

Check if an input element is set on the request.
public __isset ( string $key ) : boolean
$key string
return boolean

all() abstract public method

Get all of the input and files for the request.
abstract public all ( ) : array
return array

castBooleans() protected method

Cast all string booleans to real boolean values.
protected castBooleans ( mixed $input ) : array
$input mixed
return array

castToBooleanIsDisabled() protected method

Checks if the user wants to cast to booleans.
protected castToBooleanIsDisabled ( ) : boolean
return boolean

castValueToBoolean() protected method

Cast a given value to a boolean if it is in fact a boolean.
protected castValueToBoolean ( mixed $value ) : mixed
$value mixed
return mixed

convertArrayToSnakeCase() protected method

Convert all keys of an array to snake case.
protected convertArrayToSnakeCase ( array $input ) : array
$input array
return array

convertToSnakeCase() protected method

Convert a string or array to snake case.
protected convertToSnakeCase ( mixed $input ) : mixed
$input mixed
return mixed

convertToSnakeCaseIsDisabled() protected method

Checks if the user wants to convert to snake case.

getConvertedParameters() protected method

Cast and convert parameters.
protected getConvertedParameters ( ) : array
return array

getInputSource() abstract protected method

Get the input source for the request.
abstract protected getInputSource ( ) : Symfony\Component\HttpFoundation\ParameterBag
return Symfony\Component\HttpFoundation\ParameterBag

getValidatorInstance() protected method

Get the validator instance for the request.
protected getValidatorInstance ( ) : Illuminate\Contracts\Validation\Validator
return Illuminate\Contracts\Validation\Validator