public function __construct(AccountNumber $source, Transfer $transfer) { $this->source = (string) $source; $this->target = (string) $transfer->getTargetAccountNumber(); $this->transaction = (string) $transfer->getTransaction(); $this->amount = (int) $transfer->getAmount(); $this->identifier = uniqid(); $this->recordedOn = microtime(true); }