本文整理汇总了PHP中Invitation::invite方法的典型用法代码示例。如果您正苦于以下问题:PHP Invitation::invite方法的具体用法?PHP Invitation::invite怎么用?PHP Invitation::invite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invitation
的用法示例。
在下文中一共展示了Invitation::invite方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: it_can_invite_someone
/**
* @test
*/
public function it_can_invite_someone()
{
$id = $this->generator->generate();
$this->scenario->when(function () use($id) {
return Invitation::invite($id, 'asm89');
})->then([new InvitedEvent($id, 'asm89')]);
}
示例2: handleInviteCommand
/**
* A new invite aggregate root is created and added to the repository.
*/
protected function handleInviteCommand(InviteCommand $command)
{
$invitation = Invitation::invite($command->invitationId, $command->name);
$this->repository->save($invitation);
}
示例3: handleInviteCommand
/**
* A new invite aggregate root is created and added to the repository.
*/
protected function handleInviteCommand(InviteCommand $command)
{
$invitation = Invitation::invite($command->invitationId, $command->name);
$this->sensitiveDataManager->setSensitiveData(new \othillo\BroadwaySensitiveData\EventHandling\SensitiveData(['password' => $command->password]));
$this->repository->save($invitation);
}