/var/www/html_us/wp-content/plugins/woocommerce/src/Admin/API/AI/AIEndpoint.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php

declare( strict_types );

namespace 
Automattic\WooCommerce\Admin\API\AI;

/**
 * AI Endpoint base controller
 *
 * @internal
 */
abstract class AIEndpoint {
    
/**
     * Endpoint namespace.
     *
     * @var string
     */
    
protected $namespace 'wc-admin';

    
/**
     * Route base.
     *
     * @var string
     */
    
protected $rest_base 'ai';


    
/**
     * Endpoint.
     *
     * @var string
     */
    
protected $endpoint;

    
/**
     * Register routes.
     *
     * @param array $args Optional. Either an array of options for the endpoint,
     * or an array of arrays for multiple methods. Default empty array.
     */
    
public function register$args ) {
        
register_rest_route(
            
$this->namespace,
            
'/' $this->rest_base '/' $this->endpoint,
            
$args
        
);
    }

    
/**
     * Return schema properties.
     *
     * @return array
     */
    
public function get_schema() {
        return array();
    }
}