public function getItemListsAtDepth($depth) { $itemListsWithDepth = $this->getItemListsWithDepth(); if (array_key_exists($depth, $itemListsWithDepth)) { return new MenuHandler($itemListsWithDepth[$depth]); } return new MenuHandler(array()); }