22 public static function send(): void
26 foreach (self::getProviders() as $provider)
28 $providerCode = $provider::getCode();
31 $sender =
new Sender($providerCode, $payload);
34 static::onSuccessfullySent($providerCode, self::$date);
38 static::createAgent(static::getNextExecutionAgentDate());
48 'NAME' =>
'\\'.static::class.
'::send();',
49 'MODULE_ID' =>
'sale',
51 'AGENT_INTERVAL' => 86400,
53 'NEXT_EXEC' => $nextExecutionAgentDate,
62 $date = new \DateTime();
63 $currentMonth = $date->format(
'n');
65 $date->modify(
'+1 day');
66 $modifiedMonth = $date->format(
'n');
68 if ($modifiedMonth > $currentMonth)
72 ->modify(
'first day of '.$date->format(
'F'))
95 private static function getProviders(): array
98 Sale\PaySystem\Internals\Analytics\Provider::class,
99 Sale\Delivery\Internals\Analytics\Provider::class,
100 Sale\Cashbox\Internals\Analytics\Provider::class,
101 Sale\Internals\Analytics\Events\Provider::class,
static getFormat(Context\Culture $culture=null)