GRAYBYTE WORDPRESS FILE MANAGER3371

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/suretriggers/src/Controllers/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/suretriggers/src/Controllers//RoutesController.php
<?php
/**
 * RoutesController.
 * php version 5.6
 *
 * @category AuthController
 * @package  SureTriggers
 * @author   BSF <username@example.com>
 * @license  https://www.gnu.org/licenses/gpl-3.0.html GPLv3
 * @link     https://www.brainstormforce.com/
 * @since    1.0.0
 */

namespace SureTriggers\Controllers;

use SureTriggers\Traits\SingletonLoader;
use WP_REST_Server;

/**
 * RoutesController- Register all routes here.
 *
 * @category RoutesController
 * @package  SureTriggers
 * @author   BSF <username@example.com>
 * @license  https://www.gnu.org/licenses/gpl-3.0.html GPLv3
 * @link     https://www.brainstormforce.com/
 * @since    1.0.0
 *
 * @psalm-suppress UndefinedTrait
 */
class RoutesController {

	use SingletonLoader;

	/**
	 * Initialise data.
	 */
	public function __construct() {
		add_action( 'rest_api_init', [ $this, 'register_endpoints' ] );
	}

	/**
	 * Registe endpoint for Sass. 
	 *
	 * @return void
	 */
	public function register_endpoints() {
		$rest_controller_obj         = RestController::get_instance();
		$auth_controller_obj         = AuthController::get_instance();
		$globalsearch_controller_obj = GlobalSearchController::get_instance();
		$integration_controller_obj  = IntegrationsController::get_instance();

		// Register new triggers from SAAS.
		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'automation/triggers',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $rest_controller_obj, 'manage_triggers' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		// Execute respective integration action event.
		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'automation/action',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $rest_controller_obj, 'run_action' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		// Create new connection.
		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'connection/create-wp-connection',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $rest_controller_obj, 'create_wp_connection' ],
				'permission_callback' => '__return_true',
			]
		);

		// Revoke acccess_token.
		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'connection/revoke',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $auth_controller_obj, 'revoke_connection' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'automation/global-search',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $globalsearch_controller_obj, 'global_search' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'connection/child-integration-verify',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $integration_controller_obj, 'child_integration_verify' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'connection/disconnect',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $rest_controller_obj, 'connection_disconnect' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		// Test trigger.
		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'automation/test-trigger',
			[
				'methods'             => WP_REST_Server::CREATABLE,
				'callback'            => [ $rest_controller_obj, 'test_triggers' ],
				'permission_callback' => [ $rest_controller_obj, 'autheticate_user' ],
			]
		);

		register_rest_route(
			SURE_TRIGGERS_REST_NAMESPACE,
			'api-test',
			[
				'methods'             => WP_REST_Server::READABLE,
				'callback'            => function () {
					wp_die( 'OttoKit Says: API Working perfectly!' );
				},
				'permission_callback' => '__return_true',
			]
		);
	}
}

RoutesController::get_instance();

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:23
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:23
inteuuod / inteuuod
0644
AuthController.php
4.644 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
AutomationController.php
2.681 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
EventController.php
1.45 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
GlobalSearchController.php
737.175 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
IntegrationsController.php
3.631 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
OptionController.php
1.661 KB
February 21 2023 17:03:46
inteuuod / inteuuod
0644
RestController.php
18.074 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
RoutesController.php
4.11 KB
April 21 2025 10:30:10
inteuuod / inteuuod
0644
SettingsController.php
2.809 KB
July 04 2025 13:54:26
inteuuod / inteuuod
0644
WebhookRequestsController.php
11.371 KB
April 01 2025 11:29:04
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF