PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / api / schema / analytics-schema.php

analytics-schema.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/api/schema/analytics-schema.php

49 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace StoreEngine\API\Schema;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 trait AnalyticsSchema {
9 public function get_collection_params() {
10 return array(
11 'page' => array(
12 'description' => __( 'Current page of the collection.', 'storeengine' ),
13 'type' => 'integer',
14 'default' => 1,
15 'sanitize_callback' => 'absint',
16 'validate_callback' => 'rest_validate_request_arg',
17 'minimum' => 1,
18 ),
19 'per_page' => array(
20 'description' => __( 'Maximum number of items to be returned in result set.', 'storeengine' ),
21 'type' => 'integer',
22 'default' => 10,
23 'minimum' => 1,
24 'maximum' => 100,
25 'sanitize_callback' => 'absint',
26 'validate_callback' => 'rest_validate_request_arg',
27 ),
28 'end_date' => array(
29 'description' => __( 'Analytics end_date query date', 'storeengine' ),
30 'type' => 'string',
31 'sanitize_callback' => 'sanitize_text_field',
32 'validate_callback' => 'rest_validate_request_arg',
33 ),
34 'start_date' => array(
35 'description' => __( 'Analytics start_date query date', 'storeengine' ),
36 'type' => 'string',
37 'sanitize_callback' => 'sanitize_text_field',
38 'validate_callback' => 'rest_validate_request_arg',
39 ),
40 'search' => array(
41 'description' => __( 'Limit results to those matching a string.', 'storeengine' ),
42 'type' => 'string',
43 'sanitize_callback' => 'sanitize_text_field',
44 'validate_callback' => 'rest_validate_request_arg',
45 ),
46 );
47 }
48 }
49