) { } public function __invoke(WorkerStartEvent $event): void { $system = ActorSystem::create(); $spawned = $system->root()->spawnNamed( Props::fromProducer(fn() => new BoxOffice()), AppActor::NAME ); if ($this->container instanceof ServiceManager) { $this->container->setService(AppActor::class, new AppActor($system->root(), $spawned->getRef())); return; } throw new RuntimeException('Container is not a ServiceManager'); } }
) { } public function __invoke(WorkerStartEvent $event): void { $system = ActorSystem::create(); $spawned = $system->root()->spawnNamed( Props::fromProducer(fn() => new BoxOffice()), AppActor::NAME ); if ($this->container instanceof ServiceManager) { $this->container->setService(AppActor::class, new AppActor($system->root(), $spawned->getRef())); return; } throw new RuntimeException('Container is not a ServiceManager'); } } SPPUΞΫλʔγεςϜτοϓϨϕϧ ઃܭʹΑͬͯ τοϓϨϕϧΞΫλʔΛෳ࡞ͬͯ0,
) { } public function __invoke(WorkerStartEvent $event): void { $system = ActorSystem::create(); $spawned = $system->root()->spawnNamed( Props::fromProducer(fn() => new BoxOffice()), AppActor::NAME ); if ($this->container instanceof ServiceManager) { $this->container->setService(AppActor::class, new AppActor($system->root(), $spawned->getRef())); return; } throw new RuntimeException('Container is not a ServiceManager'); } } ΞΫλʔੜ࣌ͷઃఆ ʢͳʹͳ͍ͱ͖ͨͩͷΞΫλʔʣ
) { } public function __invoke(WorkerStartEvent $event): void { $system = ActorSystem::create(); $spawned = $system->root()->spawnNamed( Props::fromProducer(fn() => new BoxOffice()), AppActor::NAME ); if ($this->container instanceof ServiceManager) { $this->container->setService(AppActor::class, new AppActor($system->root(), $spawned->getRef())); return; } throw new RuntimeException('Container is not a ServiceManager'); } } ΞΫλʔੜ࣌ʹ໊લΛ͚ͭΔ 4QBXO/BNFE
) { } public function __invoke(WorkerStartEvent $event): void { $system = ActorSystem::create(); $spawned = $system->root()->spawnNamed( Props::fromProducer(fn() => new BoxOffice()), AppActor::NAME ); if ($this->container instanceof ServiceManager) { $this->container->setService(AppActor::class, new AppActor($system->root(), $spawned->getRef())); return; } throw new RuntimeException('Container is not a ServiceManager'); } } #PY0 ff i DFͷΞΫλʔΛ CPY@P ff i DFͱ͍͏໊લͰ τοϓϨϕϧʹஔ