Changed source root directory

This commit is contained in:
2026-03-05 16:30:11 +01:00
parent dc85447ee1
commit 538f85d7a2
5868 changed files with 749734 additions and 99 deletions

View File

@@ -0,0 +1,42 @@
<?php
/**
* API client interface.
*
* @package contact-form-7-mailchimp-extension
* @author renzo.johnson@gmail.com
* @copyright 2014-2026 https://renzojohnson.com
* @license GPL-3.0+
*/
defined( 'ABSPATH' ) || exit;
interface Cmatic_Api_Client_Interface {
/**
* Validate an API key.
*
* @param string $api_key The API key to validate.
* @param bool $log_enabled Whether logging is enabled.
* @return array{api-validation: int} Validation result.
*/
public static function validate_key( string $api_key, bool $log_enabled = false ): array;
/**
* Get audiences (lists) from Mailchimp.
*
* @param string $api_key The API key.
* @param bool $log_enabled Whether logging is enabled.
* @return array{lisdata: array, merge_fields?: array}
*/
public static function get_lists( string $api_key, bool $log_enabled = false ): array;
/**
* Get merge fields for a specific list.
*
* @param string $api_key The API key.
* @param string $list_id The list ID.
* @param bool $log_enabled Whether logging is enabled.
* @return array{merge_fields: array}
*/
public static function get_merge_fields( string $api_key, string $list_id, bool $log_enabled = false ): array;
}

View File

@@ -0,0 +1,24 @@
<?php
/**
* Logger interface.
*
* @package contact-form-7-mailchimp-extension
* @author renzo.johnson@gmail.com
* @copyright 2014-2026 https://renzojohnson.com
* @license GPL-3.0+
*/
defined( 'ABSPATH' ) || exit;
interface Cmatic_Logger_Interface {
/**
* Log a message.
*
* @param string $level Log level (INFO, ERROR, WARNING, DEBUG, CRITICAL).
* @param string $message Log message.
* @param mixed $context Optional context data.
* @return void
*/
public function log( string $level, string $message, $context = null ): void;
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* Options repository interface.
*
* @package contact-form-7-mailchimp-extension
* @author renzo.johnson@gmail.com
* @copyright 2014-2026 https://renzojohnson.com
* @license GPL-3.0+
*/
defined( 'ABSPATH' ) || exit;
interface Cmatic_Options_Interface {
/**
* Get all stored options.
*
* @return array
*/
public function get_all();
/**
* Get a value using dot notation.
*
* @param string $key Dot-notation key (e.g., 'install.id').
* @param mixed $default Default value if not found.
* @return mixed
*/
public function get( $key, $default = null );
/**
* Set a value using dot notation.
*
* @param string $key Dot-notation key.
* @param mixed $value Value to set.
* @return bool Success.
*/
public function set( $key, $value );
/**
* Save the full options array.
*
* @param array $data Full options data.
* @return bool Success.
*/
public function save( $data );
/**
* Clear internal cache.
*
* @return void
*/
public function clear_cache();
}