PHP Trait Sulu\Component\Rest\RequestParametersTrait

Show file Open project: sulu/sulu

Protected Methods

Method Description
getBooleanRequestParameter ( Request $request, string $name, boolean $force = false, boolean $default = null ) : boolean returns request parameter as boolean 'true' => true , 'false' => false.
getRequestParameter ( Request $request, string $name, boolean $force = false, mixed $default = null ) : string returns request parameter with given name.

Method Details

getBooleanRequestParameter() protected method

returns request parameter as boolean 'true' => true , 'false' => false.
protected getBooleanRequestParameter ( Request $request, string $name, boolean $force = false, boolean $default = null ) : boolean
$request Symfony\Component\HttpFoundation\Request
$name string
$force boolean TRUE if value is mandatory
$default boolean value if parameter not exists
return boolean

getRequestParameter() protected method

returns request parameter with given name.
protected getRequestParameter ( Request $request, string $name, boolean $force = false, mixed $default = null ) : string
$request Symfony\Component\HttpFoundation\Request
$name string
$force boolean TRUE if value is mandatory
$default mixed value if parameter not exists
return string