protected function getExistingPageClass(array $possible_pages)
	{
		foreach ( $possible_pages as $page_class ) {
			if ( class_exists($page_class) ) {
				return $page_class;
			}
		}

		$message = sprintf(
			'None of the possible classes were found: %s',
			implode($possible_pages, ', ')
		);

		throw new PageFactoryException($message, PageFactoryException::TYPE_PAGE_CLASS_NOT_FOUND);
	}