protected function getNested($key)
	{
		$segments = explode('.', $key);
		$data = $this->getMenu(array_shift($segments));
		if (!$data) return null;

		foreach ($segments as $key) {
			if ($data instanceof Nodes\SubmenuNode) {
				$data = $data->getSubmenu();
			}

			if ($data instanceof Collection) {
				$data = $data->getItem($key);
			} else {
				return null;
			}
		}

		return $data;
	}
protected function getNested($key)
	{
		$segments = explode('.', $key);
		$data = $this->getMenu(array_shift($segments));
		if (!$data) return null;

		foreach ($segments as $key) {
			if ($data instanceof Nodes\SubmenuNode) {
				$data = $data->getSubmenu();
			}

			if ($data instanceof Collection) {
				$data = $data->getItem($key);
			} else {
				return null;
			}
		}

		return $data;
	}
protected function getNested ( $ key ) { $ segments = explode ( '.' , $ key ) ; $ data = $ this -> getMenu ( array_shift ( $ segments ) ) ; if ( ! $ data ) return null ; foreach ( $ segments as $ key ) { if ( $ data instanceof Nodes \ SubmenuNode ) { $ data = $ data -> getSubmenu ( ) ; } if ( $ data instanceof Collection ) { $ data = $ data -> getItem ( $ key ) ; } else { return null ; } } return $ data ; }
Get a nested menu.

@param  string $key

@return mixed
Get a nested menu .