HEX
Server: Apache
System: Linux web15f74.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: lucendi (859622)
PHP: 7.4.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/lucendi/www/wp-content/plugins/wpforms-lite/src/Integrations/ConstantContact/V3/Core.php
<?php

// phpcs:ignore Generic.Commenting.DocComment.MissingShort
/** @noinspection PhpUndefinedConstantInspection */

namespace WPForms\Integrations\ConstantContact\V3;

use WPForms\Integrations\ConstantContact\V3\Settings\FormBuilder;
use WPForms\Integrations\ConstantContact\V3\Settings\PageIntegrations;
use WPForms\Providers\Provider\Core as ProviderCore;

/**
 * Class Constant Contact V3 Core.
 *
 * @since 1.9.3
 */
class Core extends ProviderCore {

	/**
	 * Priority for a provider, that will affect loading/placement order.
	 *
	 * @since 1.9.3
	 */
	const PRIORITY = 14;

	/**
	 * Unique provider slug.
	 *
	 * @since 1.9.3
	 *
	 * @var string
	 */
	const SLUG = 'constant-contact-v3';

	/**
	 * Core constructor.
	 *
	 * @since 1.9.3
	 */
	public function __construct() {

		parent::__construct(
			[
				'slug' => self::SLUG,
				'name' => $this->get_name(),
				'icon' => WPFORMS_PLUGIN_URL . 'assets/images/icon-provider-constant-contact.png',
			]
		);
	}

	/**
	 * Provide an instance of the object, that should process the submitted entry.
	 * It will use data from an already saved entry to pass it further to a Provider.
	 *
	 * @since 1.9.3
	 *
	 * @return Process
	 */
	public function get_process(): Process {

		static $process;

		if ( ! $process ) {
			$process = new Process( $this );
		}

		return $process;
	}

	/**
	 * Provide an instance of the object, that should display provider settings
	 * on Settings > Integrations page in the admin area.
	 *
	 * @since 1.9.3
	 *
	 * @return PageIntegrations
	 */
	public function get_page_integrations(): PageIntegrations {

		static $integration;

		if ( ! $integration ) {
			$integration = new PageIntegrations( static::get_instance() );
		}

		return $integration;
	}

	/**
	 * Provide an instance of the object, that should display provider settings in the Form Builder.
	 *
	 * @since 1.9.3
	 *
	 * @return FormBuilder
	 */
	public function get_form_builder(): FormBuilder {

		static $builder;

		if ( ! $builder ) {
			$builder = new FormBuilder( $this );
		}

		return $builder;
	}

	/**
	 * Provider account name.
	 *
	 * Adds "(V3)" to the name if WPFORMS_DEBUG is defined.
	 *
	 * @since 1.9.3
	 *
	 * @return string
	 */
	private function get_name(): string {

		$base = 'Constant Contact';

		if ( ! defined( 'WPFORMS_DEBUG' ) || ! WPFORMS_DEBUG ) {
			return $base;
		}

		return $base . ' (V3)';
	}
}