ReportFilter
in package
Report Filter - encapsulates report query parameters.
Replaces scattered form getValue() calls with clean object.
Tags
Table of Contents
Methods
- __construct() : mixed
- all() : array<string|int, mixed>
- Get all filters.
- fromForm() : self
- Create from Symfony form.
- get() : mixed
- Get a filter value.
- has() : bool
- Check if filter exists.
- set() : void
- Set a filter value.
- withDefaults() : self
- Merge with defaults.
Methods
__construct()
public
__construct([array<string|int, mixed> $filters = [] ]) : mixed
Parameters
- $filters : array<string|int, mixed> = []
all()
Get all filters.
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed>fromForm()
Create from Symfony form.
public
static fromForm(sfForm $form) : self
Parameters
- $form : sfForm
Return values
selfget()
Get a filter value.
public
get(string $key[, mixed $default = null ]) : mixed
Parameters
- $key : string
- $default : mixed = null
has()
Check if filter exists.
public
has(string $key) : bool
Parameters
- $key : string
Return values
boolset()
Set a filter value.
public
set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
withDefaults()
Merge with defaults.
public
withDefaults(array<string|int, mixed> $defaults) : self
Parameters
- $defaults : array<string|int, mixed>