HEX
Server: Apache/2
System: Linux cloudserver.ecpvn.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: monspa (1053)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/monspa/public_html/wp-content/plugins/easy-wp-smtp/src/Providers/Sendinblue/Api.php
<?php

namespace EasyWPSMTP\Providers\Sendinblue;

use EasyWPSMTP\ConnectionInterface;

/**
 * Class Api is a wrapper for Sendinblue library with handy methods.
 *
 * @since 2.0.0
 */
class Api {

	/**
	 * The Connection object.
	 *
	 * @since 2.0.0
	 *
	 * @var ConnectionInterface
	 */
	private $connection;

	/**
	 * Contains mailer options, constants + DB values.
	 *
	 * @since 2.0.0
	 *
	 * @var array
	 */
	private $options;

	/**
	 * API constructor that inits defaults and retrieves options.
	 *
	 * @since 2.0.0
	 *
	 * @param ConnectionInterface $connection The Connection object.
	 */
	public function __construct( $connection = null ) {

		if ( ! is_null( $connection ) ) {
			$this->connection = $connection;
		} else {
			$this->connection = easy_wp_smtp()->get_connections_manager()->get_primary_connection();
		}

		$this->options = $this->connection->get_options()->get_group( Options::SLUG );
	}

	/**
	 * Configure API key authorization: api-key.
	 *
	 * @since 2.0.0
	 * @deprecated 2.2.0 We are no longer using the Sendinblue SDK.
	 *
	 * @return null
	 */
	protected function get_api_config() {

		_deprecated_function( __METHOD__, '2.2.0' );

		return null;
	}

	/**
	 * Get the mailer client instance for Account API.
	 *
	 * @since 2.0.0
	 * @deprecated 2.2.0 We are no longer using the Sendinblue SDK.
	 */
	public function get_account_client() {

		_deprecated_function( __METHOD__, '2.2.0' );

		return null;
	}

	/**
	 * Get the mailer client instance for Sender API.
	 *
	 * @since 2.0.0
	 * @deprecated 2.2.0 We are no longer using the Sendinblue SDK.
	 */
	public function get_sender_client() {

		_deprecated_function( __METHOD__, '2.2.0' );

		return null;
	}

	/**
	 * Get the mailer client instance for SMTP API.
	 *
	 * @since 2.0.0
	 * @deprecated 2.2.0 We are no longer using the Sendinblue SDK.
	 */
	public function get_smtp_client() {

		_deprecated_function( __METHOD__, '2.2.0' );

		return null;
	}

	/**
	 * Whether the mailer is ready to be used in API calls.
	 *
	 * @since 2.0.0
	 *
	 * @return bool
	 */
	public function is_ready() {

		return ! empty( $this->options['api_key'] );
	}
}