Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin work on custom code plugins support.
- Loading branch information
1 parent
dece3e9
commit 33210b9
Showing
30 changed files
with
820 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
return function (\Symfony\Component\EventDispatcher\EventDispatcher $dispatcher, \Slim\Container $di, $settings) { | ||
|
||
$dispatcher->addSubscriber(new \App\EventHandler\DefaultRoutes(__DIR__.'/routes.php')); | ||
$dispatcher->addSubscriber(new \App\EventHandler\DefaultView($di)); | ||
$dispatcher->addSubscriber(new \App\EventHandler\DefaultNowPlaying()); | ||
|
||
$dispatcher->addListener(\App\Event\SendWebhooks::NAME, function(\App\Event\SendWebhooks $event) use ($di) { | ||
/** @var \App\Webhook\Dispatcher $webhook_dispatcher */ | ||
$webhook_dispatcher = $di[\App\Webhook\Dispatcher::class]; | ||
|
||
$webhook_dispatcher->dispatch($event); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
namespace App\Event; | ||
|
||
use Slim\App; | ||
use Symfony\Component\EventDispatcher\Event; | ||
|
||
class BuildRoutes extends Event | ||
{ | ||
const NAME = 'build-routes'; | ||
|
||
protected $app; | ||
|
||
public function __construct(App $app) | ||
{ | ||
$this->app = $app; | ||
} | ||
|
||
public function getApp(): App | ||
{ | ||
return $this->app; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
namespace App\Event; | ||
|
||
use App\View; | ||
use Symfony\Component\EventDispatcher\Event; | ||
|
||
class BuildView extends Event | ||
{ | ||
const NAME = 'build-view'; | ||
|
||
protected $view; | ||
|
||
public function __construct(View $view) | ||
{ | ||
$this->view = $view; | ||
} | ||
|
||
public function getView(): View | ||
{ | ||
return $this->view; | ||
} | ||
} |
Oops, something went wrong.