HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /var/www/goautomatic.pl/wp-content/plugins/suretriggers/src/Controllers/EventController.php
<?php
/**
 * EventController.
 * php version 5.6
 *
 * @category EventController
 * @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;

if ( ! class_exists( 'EventController' ) ) :

	/**
	 * EventController
	 *
	 * @category EventController
	 * @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
	 * @method static EventController get_instance()
	 */
	class EventController {

		use SingletonLoader;

		/**
		 * Registered triggers.
		 *
		 * @var array
		 */
		public $triggers = [];

		/**
		 * Registered actions.
		 *
		 * @var array
		 */
		public $actions = [];

		/**
		 * Constructor
		 *
		 * @since 1.0.0
		 */
		public function __construct() {
			add_action( 'init', [ $this, 'prepare_events' ], 0 );
		}


		/**
		 * Prepare events and actions.
		 *
		 * @return void
		 */
		public function prepare_events() {
			$this->triggers = apply_filters( 'sure_trigger_register_trigger', $this->triggers );
			$this->actions  = apply_filters( 'sure_trigger_register_action', $this->actions );

			AutomationController::get_instance()->register_trigger_listener();
		}
	}

	EventController::get_instance();

endif;