PHP Class Aimeos\ShopBundle\Service\Locale

Show file Open project: aimeos/aimeos-symfony2

Public Methods

Method Description
__construct ( Symfony\Component\HttpFoundation\RequestStack $requestStack, Symfony\Component\DependencyInjection\Container $container ) Initializes the locale factory object
get ( Aimeos\MShop\Context\Item\Iface $context ) : Aimeos\MShop\Locale\Item\Iface Returns the locale item for the current request
getBackend ( Aimeos\MShop\Context\Item\Iface $context, string $site ) : Aimeos\MShop\Locale\Item\Iface Returns the locale item for the current request

Method Details

__construct() public method

Initializes the locale factory object
public __construct ( Symfony\Component\HttpFoundation\RequestStack $requestStack, Symfony\Component\DependencyInjection\Container $container )
$requestStack Symfony\Component\HttpFoundation\RequestStack Current request stack
$container Symfony\Component\DependencyInjection\Container Container object to access parameters

get() public method

Returns the locale item for the current request
public get ( Aimeos\MShop\Context\Item\Iface $context ) : Aimeos\MShop\Locale\Item\Iface
$context Aimeos\MShop\Context\Item\Iface Context object
return Aimeos\MShop\Locale\Item\Iface Locale item object

getBackend() public method

Returns the locale item for the current request
public getBackend ( Aimeos\MShop\Context\Item\Iface $context, string $site ) : Aimeos\MShop\Locale\Item\Iface
$context Aimeos\MShop\Context\Item\Iface Context object
$site string Unique site code
return Aimeos\MShop\Locale\Item\Iface Locale item object