# pixelavo/1.0.8/admin/settings-panel/includes/classes/Api.php

Pixelavo – Server Side Tracking &amp; Pixel + AI Ads Tools, version 1.0.8. 40 lines.

- Page: https://pluginprobe.com/plugins/pixelavo/1.0.8/code/admin/settings-panel/includes/classes/Api.php
- Raw: https://pluginprobe.com/plugins/pixelavo/1.0.8/raw/admin/settings-panel/includes/classes/Api.php
- Modified: 2023-03-15T03:57:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/pixelavo/1.0.8/code/admin/settings-panel/includes/classes/Api.php#L10-L20`.

```php
<?php
namespace PixelavoOpt;

use WP_REST_Controller;

/**
 * REST_API Handler
 */
class Api extends WP_REST_Controller {

    /**
     * [__construct description]
     */
    public function __construct() {
        $this->includes();
        add_action('rest_api_init', [$this, 'register_routes']);
    }

    /**
     * Include the controller classes
     *
     * @return void
     */
    private function includes() {
        if (!class_exists(__NAMESPACE__ . '\Api\Settings')) {
            require_once __DIR__ . '/Api/Settings.php';
        }

    }

    /**
     * Register the API routes
     *
     * @return void
     */
    public function register_routes() {
        (new Api\Settings())->register_routes();
    }

}
```
