PHP Класс EP_WP_Date_Query

Наследование: extends WP_Date_Query
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$time_keys array Introduced in WP 4.1 added here for backwards compatibility

Открытые методы

Метод Описание
get_es_filter ( ) : array Like WP_Date_Query::get_sql takes WP_Date_Query class queries and returns ES filter arrays
simple_es_date_filter ( $args ) : array | boolean Takes WP_Query args, and returns ES filters for query Support for older style WP_Query date params
validate_date_values ( $date_query = [] ) Introduced in WP 4.1 added here for backwards compatibility

Защищенные методы

Метод Описание
build_es_date_term_filter ( array $date_term_filters = [], string $type = 'AND' ) : array Takes array of date term filters and groups them into a filter based on relationship type
build_es_range_filter ( array $range_filters = [] ) : array Takes array of range filters and groups them into a single filter
get_es_filter_for_clause ( $query ) : array Takes SQL query part, and translates it into an ES filter
get_es_filter_for_clauses ( ) : array Like WP_Date_Query::get_sql_for_clauses takes all queries in WP_Date_Query object and gets ES filters for each
get_es_filter_for_query ( $query, integer $depth ) : array
is_first_order_clause ( $query ) Introduced in WP 4.1 added here for backwards compatibility

Описание методов

build_es_date_term_filter() защищенный Метод

Takes array of date term filters and groups them into a filter based on relationship type
С версии: 0.1.4
protected build_es_date_term_filter ( array $date_term_filters = [], string $type = 'AND' ) : array
$date_term_filters array
$type string type of relationship between date term filters (AND, OR)
Результат array

build_es_range_filter() защищенный Метод

Takes array of range filters and groups them into a single filter
С версии: 0.1.4
protected build_es_range_filter ( array $range_filters = [] ) : array
$range_filters array
Результат array

get_es_filter() публичный Метод

Like WP_Date_Query::get_sql takes WP_Date_Query class queries and returns ES filter arrays
С версии: 0.1.4
public get_es_filter ( ) : array
Результат array

get_es_filter_for_clause() защищенный Метод

Takes SQL query part, and translates it into an ES filter
protected get_es_filter_for_clause ( $query ) : array
$query
Результат array ES filter

get_es_filter_for_clauses() защищенный Метод

Like WP_Date_Query::get_sql_for_clauses takes all queries in WP_Date_Query object and gets ES filters for each
С версии: 0.1.4
protected get_es_filter_for_clauses ( ) : array
Результат array

get_es_filter_for_query() защищенный Метод

С версии: 0.1.4
protected get_es_filter_for_query ( $query, integer $depth ) : array
$query array of date query clauses
$depth integer unused but may be necessary if we do nested date queries
Результат array

is_first_order_clause() защищенный Метод

Introduced in WP 4.1 added here for backwards compatibility
protected is_first_order_clause ( $query )

simple_es_date_filter() статический публичный Метод

Takes WP_Query args, and returns ES filters for query Support for older style WP_Query date params
static public simple_es_date_filter ( $args ) : array | boolean
$args
Результат array | boolean

validate_date_values() публичный Метод

Introduced in WP 4.1 added here for backwards compatibility
public validate_date_values ( $date_query = [] )

Описание свойств

$time_keys публичное свойство

Introduced in WP 4.1 added here for backwards compatibility
public array $time_keys
Результат array