. * * ========================= * * This file contains the StatisticsMapperInterface * * @category API * @package DmarcSrg * @author Aleksey Andreev (liuch) * @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3 */ namespace Liuch\DmarcSrg\Database; interface StatisticsMapperInterface { /** * Returns summary information for the specified domain and date range * * @param Domain|null $domain Domain for which the information is needed. Null is for all domains. * @param array $range Array with two dates * * @return array Array with Summary information: * 'emails' => [ * 'total' => total email processed (int) * 'dkim_spf_aligned' => Both DKIM and SPF aligned (int) * 'dkim_aligned' => Only DKIM aligned (int) * 'spf_aligned' => Only SPF aligned (int) * ]; */ public function summary($domain, array &$range): array; /** * Returns a list of ip-addresses from which the e-mail messages were received, with some statistics for each one * * @param Domain|null $domain Domain for which the information is needed. Null is for all domains. * @param array $range Array with two dates * * @return array A list of ip-addresses with fields `ip`, `emails`, `dkim_aligned`, `spf_aligned` */ public function ips($domain, array &$range): array; /** * Returns a list of organizations that sent the reports with some statistics for each one * * @param Domain|null $domain Domain for which the information is needed. Null is for all domains. * @param array $range Array with two dates * * @return array List of organizations with fields `name`, `reports`, `emails` */ public function organizations($domain, array &$range): array; }