PHP Class Sonata\Component\Customer\CustomerSelector

Inheritance: implements Sonata\Component\Customer\CustomerSelectorInterface
Show file Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$customerManager Sonata\Component\Customer\CustomerManagerInterface
$locale string
$securityContext Symfony\Component\Security\Core\SecurityContextInterface
$session Symfony\Component\HttpFoundation\Session\Session

Public Methods

Method Description
__construct ( CustomerManagerInterface $customerManager, Symfony\Component\HttpFoundation\Session\SessionInterface $session, Symfony\Component\Security\Core\SecurityContextInterface $securityContext, Sonata\IntlBundle\Locale\LocaleDetectorInterface $localeDetector )
get ( ) : Sonata\Component\Customer\CustomerInterface Get the customer.

Private Methods

Method Description
getBasket ( ) : Sonata\Component\Basket\BasketInterface

Method Details

__construct() public method

public __construct ( CustomerManagerInterface $customerManager, Symfony\Component\HttpFoundation\Session\SessionInterface $session, Symfony\Component\Security\Core\SecurityContextInterface $securityContext, Sonata\IntlBundle\Locale\LocaleDetectorInterface $localeDetector )
$customerManager CustomerManagerInterface
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$securityContext Symfony\Component\Security\Core\SecurityContextInterface
$localeDetector Sonata\IntlBundle\Locale\LocaleDetectorInterface

get() public method

Get the customer.
public get ( ) : Sonata\Component\Customer\CustomerInterface
return Sonata\Component\Customer\CustomerInterface

Property Details

$customerManager protected property

protected CustomerManagerInterface,Sonata\Component\Customer $customerManager
return Sonata\Component\Customer\CustomerManagerInterface

$locale protected property

protected string $locale
return string

$securityContext protected property

protected SecurityContextInterface,Symfony\Component\Security\Core $securityContext
return Symfony\Component\Security\Core\SecurityContextInterface

$session protected property

protected Session,Symfony\Component\HttpFoundation\Session $session
return Symfony\Component\HttpFoundation\Session\Session