Prooph\EventSourcing\AggregateChanged::__construct PHP Method

__construct() protected method

protected __construct ( string $aggregateId, array $payload, array $metadata = [] )
$aggregateId string
$payload array
$metadata array
    protected function __construct($aggregateId, array $payload, array $metadata = [])
    {
        //Metadata needs to be set before setAggregateId is called
        $this->metadata = $metadata;
        $this->setAggregateId($aggregateId);
        $this->setPayload($payload);
        $this->init();
    }