/** * Gets a page and children based on it's ID * @param string $id The page ID * @return object A JSON tree */ private static function _getPage($id) { self::$_result = null; self::_getPageHelper(self::$_data->pages, $id); if (!isset(self::$_result)) { throw new \Exception('Sitemap: Page not found.'); } return self::$_result; }