HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/files.wb-cloud.nl/public_html/lib/public/L10N/ILanguageIterator.php
<?php

/**
 * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\L10N;

/**
 * Interface ILanguageIterator
 *
 * iterator across language settings (if provided) in this order:
 * 1. returns the forced language or:
 * 2. if applicable, the trunk of 1 (e.g. "fu" instead of "fu_BAR"
 * 3. returns the user language or:
 * 4. if applicable, the trunk of 3
 * 5. returns the system default language or:
 * 6. if applicable, the trunk of 5
 * 7+∞. returns 'en'
 *
 * if settings are not present or truncating is not applicable, the iterator
 * skips to the next valid item itself
 *
 * @template-extends \Iterator<int, string>
 * @since 14.0.0
 */
interface ILanguageIterator extends \Iterator {
	/**
	 * Return the current element
	 *
	 * @since 14.0.0
	 */
	public function current(): string;

	/**
	 * Move forward to next element
	 *
	 * @since 14.0.0
	 */
	public function next(): void;

	/**
	 * Return the key of the current element
	 *
	 * @since 14.0.0
	 */
	public function key(): int;

	/**
	 * Checks if current position is valid
	 *
	 * @since 14.0.0
	 */
	public function valid(): bool;
}