<?php

/**
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
 * @copyright Metaways Infosystems GmbH, 2011
 * @copyright Aimeos (aimeos.org), 2015-2025
 * @package MShop
 * @subpackage Locale
 */


namespace Aimeos\MShop\Locale\Item;


/**
 * Interface of transfer objects for request specific parameters.
 *
 * @package MShop
 * @subpackage Locale
 */
interface Iface
	extends \Aimeos\MShop\Common\Item\Iface, \Aimeos\MShop\Common\Item\Position\Iface, \Aimeos\MShop\Common\Item\Status\Iface
{
	/**
	 * Returns the site code of the item.
	 *
	 * Caution: This will return the site code of the locale item, not the code
	 * of the associated site item! If you need the site code of the site item,
	 * you have to call getSiteItem() and getCode() on the returned object.
	 *
	 * @return string|null Site code or NULL if not available
	 */
	public function getSiteCode() : ?string;

	/**
	 * Returns the site item object.
	 *
	 * @return \Aimeos\MShop\Locale\Item\Site\Iface Site item object
	 * @throws \Aimeos\MShop\Locale\Exception if site object isn't available
	 */
	public function getSiteItem() : \Aimeos\MShop\Locale\Item\Site\Iface;

	/**
	 * Returns the site IDs for the locale site constants.
	 *
	 * @param int $level Site level constant from \Aimeos\MShop\Locale\Manager\Base
	 * @return array|string Associative list of site constant as key and sites as values or site ID
	 */
	public function getSites( int $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL );

	/**
	 * Returns the list site IDs up to the root site item.
	 *
	 * @return array List of site IDs
	 */
	public function getSitePath() : array;

	/**
	 * Sets the identifier of the shop instance.
	 *
	 * @param string $id ID of the shop instance
	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item for chaining method calls
	 */
	public function setSiteId( string $id ) : \Aimeos\MShop\Locale\Item\Iface;

	/**
	 * Returns the ISO language code.
	 *
	 * @return string|null ISO language code (e.g. de or de_DE)
	 */
	public function getLanguageId() : ?string;

	/**
	 * Sets the ISO language code.
	 *
	 * @param string|null $langid ISO language code (e.g. de or de_DE)
	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item for chaining method calls
	 */
	public function setLanguageId( ?string $langid ) : \Aimeos\MShop\Locale\Item\Iface;

	/**
	 * Returns the currency ID.
	 *
	 * @return string|null Three letter ISO currency code (e.g. EUR)
	 */
	public function getCurrencyId() : ?string;

	/**
	 * Sets the currency ID.
	 *
	 * @param string|null $currencyid Three letter ISO currency code (e.g. EUR)
	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item for chaining method calls
	 */
	public function setCurrencyId( ?string $currencyid ) : \Aimeos\MShop\Locale\Item\Iface;
}
