/** * @param string $id * @param \MToolkit\Controller\MAbstractController $control */ protected function addControl($id, MAbstractController $control) { MDataType::mustBeString($id); $this->controls->insert($id, $control); }
/** * Adds a new definition of Route. * * @param MRoute $route * @throws MInvalidClassNameException * @throws MInvalidMethodNameException * @throws MInvalidRoleException * @throws MInvalidRouteTypeException */ public function add(MRoute $route) { $this->validateRoute($route); $this->routeList->insert($route->getRole(), $route); }