Path: blob/1.0-develop/app/Providers/EventServiceProvider.php
14039 views
<?php12namespace Pterodactyl\Providers;34use Pterodactyl\Models\User;5use Pterodactyl\Models\Server;6use Pterodactyl\Models\Subuser;7use Pterodactyl\Models\EggVariable;8use Pterodactyl\Observers\UserObserver;9use Pterodactyl\Observers\ServerObserver;10use Pterodactyl\Observers\SubuserObserver;11use Pterodactyl\Listeners\TwoFactorListener;12use Pterodactyl\Listeners\RevocationListener;13use Pterodactyl\Observers\EggVariableObserver;14use Pterodactyl\Listeners\AuthenticationListener;15use Pterodactyl\Events\Server\Installed as ServerInstalledEvent;16use Pterodactyl\Notifications\ServerInstalled as ServerInstalledNotification;17use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;1819class EventServiceProvider extends ServiceProvider20{21/**22* The event to listener mappings for the application.23*/24protected $listen = [25ServerInstalledEvent::class => [ServerInstalledNotification::class],26];2728protected $subscribe = [29AuthenticationListener::class,30RevocationListener::class,31TwoFactorListener::class,32];3334protected static $shouldDiscoverEvents = false;3536/**37* Register any events for your application.38*/39public function boot(): void40{41parent::boot();4243User::observe(UserObserver::class);44Server::observe(ServerObserver::class);45Subuser::observe(SubuserObserver::class);46EggVariable::observe(EggVariableObserver::class);47}48}495051