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

Hello Plus, version trunk. 36 lines.

- Page: https://pluginprobe.com/plugins/hello-plus/trunk/code/modules/admin/components/api-controller.php
- Raw: https://pluginprobe.com/plugins/hello-plus/trunk/raw/modules/admin/components/api-controller.php
- Modified: 2026-05-19T13:55:52+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/trunk/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\Blank_Canvas_Option;
use HelloPlus\Modules\Admin\Classes\Ajax\Setup_Wizard;
use HelloPlus\Modules\Admin\Classes\Rest\Onboarding_Settings;
use HelloPlus\Modules\Admin\Classes\Rest\Whats_New;

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->endpoints['whats-new'] = new Whats_New();

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

```
