2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
2022-05-15 18:40:19 +00:00
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Models\Subuser;
|
|
|
|
use Pterodactyl\Models\EggVariable;
|
|
|
|
use Pterodactyl\Observers\UserObserver;
|
|
|
|
use Pterodactyl\Observers\ServerObserver;
|
|
|
|
use Pterodactyl\Observers\SubuserObserver;
|
|
|
|
use Pterodactyl\Observers\EggVariableObserver;
|
2022-05-28 21:03:58 +00:00
|
|
|
use Pterodactyl\Listeners\Auth\AuthenticationListener;
|
2018-07-01 21:34:40 +00:00
|
|
|
use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;
|
|
|
|
use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;
|
2015-12-06 18:58:49 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* The event to listener mappings for the application.
|
2015-12-06 18:58:49 +00:00
|
|
|
*/
|
2018-07-01 21:34:40 +00:00
|
|
|
protected $listen = [
|
2022-05-28 21:03:58 +00:00
|
|
|
ServerInstalledEvent::class => [ServerInstalledNotification::class],
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $subscribe = [
|
|
|
|
AuthenticationListener::class,
|
2018-07-01 21:34:40 +00:00
|
|
|
];
|
2022-05-15 18:40:19 +00:00
|
|
|
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* Register any events for your application.
|
2022-05-15 18:40:19 +00:00
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function boot(): void
|
2022-05-15 18:40:19 +00:00
|
|
|
{
|
|
|
|
parent::boot();
|
|
|
|
|
|
|
|
User::observe(UserObserver::class);
|
|
|
|
Server::observe(ServerObserver::class);
|
|
|
|
Subuser::observe(SubuserObserver::class);
|
|
|
|
EggVariable::observe(EggVariableObserver::class);
|
|
|
|
}
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|