PluginProbe
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.4.0
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.4.0
4.7.2 4.7.1 4.7.0 4.6.6 4.6.5 4.6.4 4.6.3 4.6.2 4.6.1 4.6.0 4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 All 281 releases
surecart / app / src / Models / Concerns / ImportModel.php
ImportModel.php
56 lines 892 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SureCart\Models\Concerns;
4
5 use SureCart\Models\Import;
6 use SureCart\Models\Model;
7
8 /**
9 * Import model trait
10 */
11 abstract class ImportModel extends Model {
12 /**
13 * Rest API endpoint.
14 *
15 * @var string
16 */
17 protected $endpoint = 'imports';
18
19 /**
20 * Object name.
21 *
22 * @var string
23 */
24 protected $object_name = 'import';
25
26 /**
27 * Find a product import by id.
28 *
29 * @param string $id The id of the product import.
30 *
31 * @return Import|false
32 */
33 protected function find( $id = '' ) {
34 return ( new Import() )->find( $id );
35 }
36
37 /**
38 * Get a product import by id.
39 *
40 * @param array $args Pagination args.
41 * @return mixed
42 */
43 protected function paginate( $args = [] ) {
44 return ( new Import() )->paginate( $args );
45 }
46
47 /**
48 * Fetch a list of items.
49 *
50 * @return array|\WP_Error;
51 */
52 protected function get() {
53 return ( new Import() )->get();
54 }
55 }
56