Path: blob/1.0-develop/app/Observers/ServerObserver.php
7432 views
<?php12namespace Pterodactyl\Observers;34use Pterodactyl\Events;5use Pterodactyl\Models\Server;6use Illuminate\Foundation\Bus\DispatchesJobs;78class ServerObserver9{10use DispatchesJobs;1112/**13* Listen to the Server creating event.14*/15public function creating(Server $server): void16{17event(new Events\Server\Creating($server));18}1920/**21* Listen to the Server created event.22*/23public function created(Server $server): void24{25event(new Events\Server\Created($server));26}2728/**29* Listen to the Server deleting event.30*/31public function deleting(Server $server): void32{33event(new Events\Server\Deleting($server));34}3536/**37* Listen to the Server deleted event.38*/39public function deleted(Server $server): void40{41event(new Events\Server\Deleted($server));42}4344/**45* Listen to the Server saving event.46*/47public function saving(Server $server): void48{49event(new Events\Server\Saving($server));50}5152/**53* Listen to the Server saved event.54*/55public function saved(Server $server): void56{57event(new Events\Server\Saved($server));58}5960/**61* Listen to the Server updating event.62*/63public function updating(Server $server): void64{65event(new Events\Server\Updating($server));66}6768/**69* Listen to the Server saved event.70*/71public function updated(Server $server): void72{73event(new Events\Server\Updated($server));74}75}767778