misc_pterodactyl-panel/app/Observers/ServerObserver.php

77 lines
1.5 KiB
PHP
Raw Normal View History

<?php
2016-12-07 22:46:38 +00:00
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));
}
2017-02-17 23:19:53 +00:00
/**
* Listen to the Server saving event.
*/
public function saving(Server $server): void
2017-02-17 23:19:53 +00:00
{
event(new Events\Server\Saving($server));
}
/**
* Listen to the Server saved event.
*/
public function saved(Server $server): void
2017-02-17 23:19:53 +00:00
{
event(new Events\Server\Saved($server));
}
/**
2017-03-05 00:03:49 +00:00
* Listen to the Server updating event.
2017-02-17 23:19:53 +00:00
*/
public function updating(Server $server): void
2017-02-17 23:19:53 +00:00
{
event(new Events\Server\Updating($server));
}
/**
* Listen to the Server saved event.
*/
public function updated(Server $server): void
2017-02-17 23:19:53 +00:00
{
event(new Events\Server\Updated($server));
}
}