\FAA\Obj\SearchFilterDateRange

Search filter object This is the date range filter.

Summary

Methods
Properties
Constants
Field()
ToSqlQuery()
ToQuery()
IsOr()
__construct()
No public properties found
No constants found
No protected methods found
$field
$value
$value_from
$field_from
$value_to
$field_to
$is_or
N/A
No private methods found
No private properties found
N/A

Properties

$field

$field :

Type

$value

$value :

Type

$value_from

$value_from :

Type

$field_from

$field_from :

Type

$value_to

$value_to :

Type

$field_to

$field_to :

Type

$is_or

$is_or :

Type

Methods

Field()

Field()

ToQuery()

ToQuery(): string

Create query Convert to solr search query like datefrom:[2012-05-06T14:05:00Z TO *] AND dateto:[* TO 2015-07-06T03:05:00Z]

Returns

string —

The search query

IsOr()

IsOr(): boolean

Is or When merged with other filter use OR instead of AND

Returns

boolean —

Is or merge

__construct()

__construct(string  $field_from,string  $field_to,string  $value_from,string  $value_to,boolean  $is_or = false)

FilterDateRange constructor.

Create a date range filter, at least one of the dates must be filled

Parameters

string $field_from

The start date field name

string $field_to

The end date field name

string $value_from

The date start value in format parsable by strtotime()

string $value_to

The end start value in format parsable by strtotime()

boolean $is_or

Merge with other filters with or