Files
apache
wp-content
mu-plugins
plugins
activitypub
audioigniter
authldap
companion-auto-update
easy-digital-downloads
assets
includes
adjustments
admin
api
blocks
cart
checkout
compat
currency
customers
database
engine
queries
class-adjustment.php
class-customer-address.php
class-customer-email-address.php
class-customer.php
class-log-api-request.php
class-log-file-download.php
class-log.php
class-note.php
class-order-address.php
class-order-adjustment.php
class-order-item.php
class-order-transaction.php
class-order.php
rows
schemas
tables
README.md
downloads
emails
extensions
gateways
libraries
logs
models
notes
orders
payments
reports
traits
users
utils
EDD_SL_Plugin_Updater.php
actions.php
ajax-functions.php
class-base-object.php
class-component.php
class-easy-digital-downloads.php
class-edd-cache-helper.php
class-edd-cli.php
class-edd-cron.php
class-edd-customer-query.php
class-edd-customer.php
class-edd-db-customer-meta.php
class-edd-db-customers.php
class-edd-db.php
class-edd-discount.php
class-edd-download.php
class-edd-fees.php
class-edd-html-elements.php
class-edd-license-handler.php
class-edd-logging.php
class-edd-register-meta.php
class-edd-requirements-check.php
class-edd-roles.php
class-edd-session.php
class-edd-stats.php
class-stats.php
class-structured-data.php
class-utilities.php
compat-functions.php
component-functions.php
country-functions.php
customer-functions.php
date-functions.php
deprecated-functions.php
deprecated-hooks.php
discount-functions.php
download-functions.php
error-tracking.php
formatting.php
install.php
interface-edd-exception.php
mime-types.php
misc-functions.php
plugin-compatibility.php
post-types.php
privacy-functions.php
process-download.php
process-purchase.php
query-filters.php
refund-functions.php
scripts.php
shortcodes.php
tax-functions.php
template-actions.php
template-functions.php
theme-compatibility.php
user-functions.php
widgets.php
languages
src
templates
vendor
easy-digital-downloads.php
license.txt
readme.txt
uninstall.php
gitium
gp-premium
jetpack-protect
menu-icons
simple-local-avatars
smtp-mailer
two-factor
wp-piwik
wp-webauthn
index.php
themes
index.php
.dbsetup
.gitignore
htaccess
php.ini
laipower/wp-content/plugins/easy-digital-downloads/includes/database/queries/class-log-file-download.php

157 lines
6.5 KiB
PHP

<?php
/**
* File Download Log Query Class.
*
* @package EDD
* @subpackage Database\Queries
* @copyright Copyright (c) 2018, Easy Digital Downloads, LLC
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 3.0
*/
namespace EDD\Database\Queries;
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
use EDD\Database\Query;
/**
* Class used for querying items.
*
* @since 3.0
*
* @see \EDD\Database\Queries\Log_File_Download::__construct() for accepted arguments.
*/
class Log_File_Download extends Query {
/** Table Properties ******************************************************/
/**
* Name of the database table to query.
*
* @since 3.0
* @access public
* @var string
*/
protected $table_name = 'logs_file_downloads';
/**
* String used to alias the database table in MySQL statement.
*
* @since 3.0
* @access public
* @var string
*/
protected $table_alias = 'lf';
/**
* Name of class used to setup the database schema
*
* @since 3.0
* @access public
* @var string
*/
protected $table_schema = '\\EDD\\Database\\Schemas\\Logs_File_Downloads';
/** Item ******************************************************************/
/**
* Name for a single item
*
* @since 3.0
* @access public
* @var string
*/
protected $item_name = 'logs_file_download';
/**
* Plural version for a group of items.
*
* @since 3.0
* @access public
* @var string
*/
protected $item_name_plural = 'logs_file_downloads';
/**
* Callback function for turning IDs into objects
*
* @since 3.0
* @access public
* @var mixed
*/
protected $item_shape = 'EDD\\Logs\\File_Download_Log';
/** Cache *****************************************************************/
/**
* Group to cache queries and queried items in.
*
* @since 3.0
* @access public
* @var string
*/
protected $cache_group = 'logs_file_downloads';
/** Methods ***************************************************************/
/**
* Sets up the query, based on the query vars passed.
*
* @since 3.0
* @access public
*
* @param string|array $query {
* Optional. Array or query string of query parameters. Default empty.
*
* @type int $id An log ID to only return that log. Default empty.
* @type array $id__in Array of log IDs to include. Default empty.
* @type array $id__not_in Array of log IDs to exclude. Default empty.
* @type string $product_id A product ID to only return those products. Default empty.
* @type array $product_id__in Array of product IDs to include. Default empty.
* @type array $product_id__not_in Array of product IDs to exclude. Default empty.
* @type string $file_id A file ID to only return those files. Default empty.
* @type array $file_id__in Array of file IDs to include. Default empty.
* @type array $file_id__not_in Array of file IDs to exclude. Default empty.
* @type string $order_id An order ID to only return those orders. Default empty.
* @type array $order_id__in Array of order IDs to include. Default empty.
* @type array $order_id__not_in Array of order IDs to exclude. Default empty.
* @type string $price_id A price ID to only return those prices. Default empty.
* @type array $price_id__in Array of price IDs to include. Default empty.
* @type array $price_id__not_in Array of price IDs to exclude. Default empty.
* @type string $customer_id A customer ID to only return those customers. Default empty.
* @type array $customer_id__in Array of customer IDs to include. Default empty.
* @type array $customer_id__not_in Array of customer IDs to exclude. Default empty.
* @type string $ip An IP to only return that IP address. Default empty.
* @type array $ip__in Array of IPs to include. Default empty.
* @type array $ip__not_in Array of IPs to exclude. Default empty.
* @type string $user_agent A user agent to only return that agent. Default empty.
* @type array $user_agent__in Array of user agents to include. Default empty.
* @type array $user_agent__not_in Array of user agents to exclude. Default empty.
* @type array $date_query Query all datetime columns together. See WP_Date_Query.
* @type array $date_created_query Date query clauses to limit by. See WP_Date_Query.
* Default null.
* @type array $date_modified_query Date query clauses to limit by. See WP_Date_Query.
* Default null.
* @type bool $count Whether to return a count (true) or array of objects.
* Default false.
* @type string $fields Item fields to return. Accepts any column known names
* or empty (returns an array of complete objects). Default empty.
* @type int $number Limit number of logs to retrieve. Default 100.
* @type int $offset Number of logs to offset the query. Used to build LIMIT clause.
* Default 0.
* @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
* @type string|array $orderby Accepts 'id', 'product_id', 'file_id', 'order_id', 'customer_id',
* 'ip', 'date_created', and 'date_modified'. Also accepts false,
* an empty array, or 'none' to disable `ORDER BY` clause.
* Default 'id'.
* @type string $order How to order results. Accepts 'ASC', 'DESC'. Default 'DESC'.
* @type string $search Search term(s) to retrieve matching logs for. Default empty.
* @type bool $update_cache Whether to prime the cache for found logs. Default false.
* }
*/
public function __construct( $query = array() ) {
parent::__construct( $query );
}
}