locator = $locator; } public function getTypes(): array { return $this->locator->getProvidedServices(); } public function getServiceByType(string $type): SynchronizerInterface { if (!$this->locator->has($type)) { throw new FlexiBeeException( sprintf('Unknown synchronizer type \'%s\'!', $type) ); } return $this->locator->get($type); } }