PHP 클래스 Give_Stats, Give

Base class for other stats classes Primarily for setting up dates and ranges
부터: 1.8
파일 보기 프로젝트 열기: wordimpress/give 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$end_date Can be a timestamp, formatted date, date string (such as August 3, 2013), or a predefined date string, such as last_week or this_month Predefined date options are: today, yesterday, this_week, last_week, this_month, last_month this_quarter, last_quarter, this_year, last_year The end date is optional
$start_date Can be a timestamp, formatted date, date string (such as August 3, 2013), or a predefined date string, such as last_week or this_month Predefined date options are: today, yesterday, this_week, last_week, this_month, last_month this_quarter, last_quarter, this_year, last_year
$timestamp Flag to determine if current query is based on timestamps

공개 메소드들

메소드 설명
__construct ( ) : void Class Constructor
convert_date ( string $date, boolean $end_date = false ) : array | WP_Error Convert Date
count_where ( string $where = '' ) : string Count Where
get_predefined_dates ( ) : array Get Predefined Dates
payments_where ( string $where = '' ) : string Payment Where
setup_dates ( string $_start_date = 'this_month', boolean $_end_date = false ) : void Setup the dates passed to our constructor.

메소드 상세

__construct() 공개 메소드

Set up the Give Stats Class.
부터: 1.0
public __construct ( ) : void
리턴 void

convert_date() 공개 메소드

Converts a date to a timestamp.
부터: 1.0
public convert_date ( string $date, boolean $end_date = false ) : array | WP_Error
$date string Date.
$end_date boolean End date. Default is false.
리턴 array | WP_Error If the date is invalid, a WP_Error object will be returned.

count_where() 공개 메소드

Modifies the WHERE flag for payment counts.
부터: 1.0
public count_where ( string $where = '' ) : string
$where string SQL WHERE statment.
리턴 string

get_predefined_dates() 공개 메소드

Retrieve the predefined date periods permitted.
부터: 1.0
public get_predefined_dates ( ) : array
리턴 array Predefined dates.

payments_where() 공개 메소드

Modifies the WHERE flag for payment queries.
부터: 1.0
public payments_where ( string $where = '' ) : string
$where string SQL WHERE statment.
리턴 string

setup_dates() 공개 메소드

This calls the convert_date() member function to ensure the dates are formatted correctly.
부터: 1.0
public setup_dates ( string $_start_date = 'this_month', boolean $_end_date = false ) : void
$_start_date string Start date. Default is 'this_month'.
$_end_date boolean End date. Default is false.
리턴 void

프로퍼티 상세

$end_date 공개적으로 프로퍼티

Can be a timestamp, formatted date, date string (such as August 3, 2013), or a predefined date string, such as last_week or this_month Predefined date options are: today, yesterday, this_week, last_week, this_month, last_month this_quarter, last_quarter, this_year, last_year The end date is optional
public $end_date

$start_date 공개적으로 프로퍼티

Can be a timestamp, formatted date, date string (such as August 3, 2013), or a predefined date string, such as last_week or this_month Predefined date options are: today, yesterday, this_week, last_week, this_month, last_month this_quarter, last_quarter, this_year, last_year
부터: 1.0
public $start_date

$timestamp 공개적으로 프로퍼티

Flag to determine if current query is based on timestamps
public $timestamp