GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gv-request-rest.php
Go to the documentation of this file.
1 <?php
2 namespace GV\REST;
3 
4 /** If this file is called directly, abort. */
5 if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6  die();
7 }
8 
9 /**
10  * The default REST Request class.
11  */
12 class Request extends \GV\Request {
13  private $request;
14 
15  /**
16  * @param \WP_REST_Request $request The WordPress REST request object.
17  */
18  public function __construct( \WP_REST_Request $request ) {
19  $this->request = $request;
20  }
21 
22  /**
23  * Retrieve paging parameters if any.
24  *
25  * @return array
26  */
27  public function get_paging() {
28  return array(
29  'paging' => array(
30  'page_size' => $this->request->get_param( 'limit' ),
31  'current_page' => $this->request->get_param( 'page' ),
32  ),
33  );
34  }
35 }
If this file is called directly, abort.
__construct(\WP_REST_Request $request)
If this file is called directly, abort.
get_paging()
Retrieve paging parameters if any.