PHP code example of 5upermario / slim-skeleton
1. Go to this page and download the library: Download 5upermario/slim-skeleton library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
5upermario / slim-skeleton example snippets
return [
\App\Example\Domain\Event\SomeEvent::class => [
\App\Example\Domain\Event\SomeListener1::class,
\App\Example\Domain\Event\SomeListener2::class,
],
];
class ExampleClass {
private EventDispatcher $eventDispatcher;
public function __construct(EventDispatcher $eventDispatcher) {
$this->eventDispatcher = $eventDispatcher;
}
public function someFunction() {
$this->eventDispatcher->dispatch(new SomeEvent());
}
}