/** * Constructor * * @param @inject ConfigInterface $config * @param @inject TimerInterface $timer */ public function __construct(ConfigInterface $config, TimerInterface $timer) { $this->machine = $config->getMachine(); if (!is_int($this->machine) || $this->machine < 0 || $this->machine > 1023) { throw new \InvalidArgumentException('Machine identifier invalid -- must be 10 bit integer (0 to 1023)'); } $this->timer = $timer; }