appwrite/src/Appwrite/Event/StatsResources.php

30 lines
571 B
PHP
Raw Normal View History

2025-01-30 04:06:57 +00:00
<?php
namespace Appwrite\Event;
2025-02-05 09:53:29 +00:00
use Utopia\Queue\Publisher;
2025-01-30 04:06:57 +00:00
class StatsResources extends Event
{
2025-02-05 09:53:29 +00:00
public function __construct(protected Publisher $publisher)
2025-01-30 04:06:57 +00:00
{
2025-02-05 09:53:29 +00:00
parent::__construct($publisher);
2025-01-30 04:06:57 +00:00
$this
->setQueue(Event::STATS_RESOURCES_QUEUE_NAME)
->setClass(Event::STATS_RESOURCES_CLASS_NAME);
}
/**
* Prepare the payload for the usage event.
*
* @return array
*/
protected function preparePayload(): array
{
return [
'project' => $this->project
];
}
}