container = $container; $this->menuIds = $menuIds; } public function get($name, array $options = array()) { if (!isset($this->menuIds[$name])) { throw new \InvalidArgumentException(sprintf('The menu "%s" is not defined.', $name)); } return $this->container->get($this->menuIds[$name]); } public function has($name, array $options = array()) { return isset($this->menuIds[$name]); } }