PHP code example of thesis / message
1. Go to this page and download the library: Download thesis/message 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/ */
thesis / message example snippets
use Thesis\Message\Call;
use Thesis\Message\Command;
use Thesis\Message\Event;
final readonly class RegisterUser implements Command
{
public function __construct(
public Uuid $userId,
public string $name,
) {}
}
final readonly class UserRegistered implements Event
{
public function __construct(
public Uuid $userId,
) {}
}
/**
* @implements Call<string>
*/
final readonly class GetUserName implements Call
{
public function __construct(
public Uuid $userId,
) {}
}