/** *Subs CRUD for a module configuration object */ public static function configureSubs(ModuleConfig &$config, LogInterface $log) { do { $log->repeat('-', 80, 'white'); $opt = Cmd::selectWithKeys(array('N' => 'New sub', 'E' => 'End adding subs'), '>', $log); if (strtolower($opt) == 'e') { break; } $subConfig = new SubConfig(); $subConfig->setModule($module); $config->addSub(Sub::configure($subConfig, $log)); } while (TRUE); }
public function addSub(Sub $sub) { $this->subs[$sub->getName()] = $sub; return $this; }