mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-25 18:42:31 +01:00
cbcf62086f
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
77 lines
1.5 KiB
PHP
77 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Pterodactyl\Observers;
|
|
|
|
use Pterodactyl\Events;
|
|
use Pterodactyl\Models\Server;
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
|
|
class ServerObserver
|
|
{
|
|
use DispatchesJobs;
|
|
|
|
/**
|
|
* Listen to the Server creating event.
|
|
*/
|
|
public function creating(Server $server): void
|
|
{
|
|
event(new Events\Server\Creating($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server created event.
|
|
*/
|
|
public function created(Server $server): void
|
|
{
|
|
event(new Events\Server\Created($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server deleting event.
|
|
*/
|
|
public function deleting(Server $server): void
|
|
{
|
|
event(new Events\Server\Deleting($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server deleted event.
|
|
*/
|
|
public function deleted(Server $server): void
|
|
{
|
|
event(new Events\Server\Deleted($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server saving event.
|
|
*/
|
|
public function saving(Server $server): void
|
|
{
|
|
event(new Events\Server\Saving($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server saved event.
|
|
*/
|
|
public function saved(Server $server): void
|
|
{
|
|
event(new Events\Server\Saved($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server updating event.
|
|
*/
|
|
public function updating(Server $server): void
|
|
{
|
|
event(new Events\Server\Updating($server));
|
|
}
|
|
|
|
/**
|
|
* Listen to the Server saved event.
|
|
*/
|
|
public function updated(Server $server): void
|
|
{
|
|
event(new Events\Server\Updated($server));
|
|
}
|
|
}
|