public function attach(Adapter $supervisor) { $this->supervisor = $supervisor; $options = array('command' => $this->getCommand(), 'process_name' => '%(program_name)s-%(process_num)d', 'numprocs' => $this->getNumprocs(), 'stopasgroup' => true, 'autorestart' => true); return $this->supervisor->addProgramToGroup($this->getGroup(), $this->getName(), $options); }