Heratio Framework API Reference

ReportFilter
in package

Report Filter - encapsulates report query parameters.

Replaces scattered form getValue() calls with clean object.

Tags
author

Johan Pieterse pieterse.johan3@gmail.com

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
self

get()

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
bool

set()

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>
Return values
self

        
On this page

Search results