Oihana PHP System

ParamsStrategyTrait

Provides a property to retrieve params in the Http request parameters or body.

Table of Contents

Constants

PARAMS_STRATEGY  = 'paramsStrategy'
The 'paramsStrategy' parameter.

Properties

$paramsStrategy  : string
Strategy to fetch parameters: 'both' (default), 'body' only, or 'query' only.

Methods

initializeParamsStrategy()  : static
Initialize the params strategy : 'both' (default), 'body' (only), 'query' (only).

Constants

PARAMS_STRATEGY

The 'paramsStrategy' parameter.

public mixed PARAMS_STRATEGY = 'paramsStrategy'

Properties

$paramsStrategy

Strategy to fetch parameters: 'both' (default), 'body' only, or 'query' only.

public string $paramsStrategy = \oihana\enums\http\HttpParamStrategy::BOTH

Methods

initializeParamsStrategy()

Initialize the params strategy : 'both' (default), 'body' (only), 'query' (only).

public initializeParamsStrategy([string|array<string|int, mixed>|null $strategy = null ]) : static
Parameters
$strategy : string|array<string|int, mixed>|null = null

$strategy Either a string strategy or an array with key ControllerParam::PARAMS_STRATEGY.

Return values
static

        
On this page

Search results