PHP code example of mj-zana / ddd
1. Go to this page and download the library: Download mj-zana/ddd 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/ */
mj-zana / ddd example snippets
use Zana\Ddd\Domain\AggregateRoot;
use Zana\Ddd\Application\Command;
final class CreateUser extends Command
{
public function __construct(public readonly string $name) { parent::__construct(); }
}
final class User extends AggregateRoot
{
public function rename(string $name): void { /* ... */ }
}