# hello-plus/1.2.0/modules/admin/components/api-controller.php

Hello Plus, version 1.2.0. 33 lines.

- Page: https://pluginprobe.com/plugins/hello-plus/1.2.0/code/modules/admin/components/api-controller.php
- Raw: https://pluginprobe.com/plugins/hello-plus/1.2.0/raw/modules/admin/components/api-controller.php
- Modified: 2025-01-21T15:57:44+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/hello-plus/1.2.0/code/modules/admin/components/api-controller.php#L10-L20`.

```php
<?php

namespace HelloPlus\Modules\Admin\Components;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

use HelloPlus\Modules\Admin\Classes\Ajax\Setup_Wizard;
use HelloPlus\Modules\Admin\Classes\Rest\Onboarding_Settings;


class Api_Controller {

	protected $endpoints = [];

	protected $ajax_classes = [];

	public function get_endpoint( string $endpoint ) {
		if ( ! isset( $this->endpoints[ $endpoint ] ) ) {
			throw new \Exception( esc_html__( 'Endpoint not found', 'hello-plus' ) );
		}

		return $this->endpoints[ $endpoint ];
	}

	public function __construct() {
		$this->endpoints['onboarding-settings'] = new Onboarding_Settings();

		$this->ajax_classes['setup-wizard'] = new Setup_Wizard();
	}
}

```
