PHP Class Sonata\Component\Basket\BasketSessionFactory

Inheritance: extends BaseBasketFactory
显示文件 Open project: sonata-project/ecommerce Class Usage Examples

Protected Properties

Property Type Description
$basketBuilder Sonata\Component\Basket\BasketBuilderInterface
$basketManager Sonata\Component\Basket\BasketManagerInterface
$currencyDetector Sonata\Component\Currency\CurrencyDetectorInterface
$session Symfony\Component\HttpFoundation\Session\SessionInterface

Public Methods

Method Description
__construct ( Sonata\Component\Basket\BasketManagerInterface $basketManager, Sonata\Component\Basket\BasketBuilderInterface $basketBuilder, Sonata\Component\Currency\CurrencyDetectorInterface $currencyDetector, Symfony\Component\HttpFoundation\Session\SessionInterface $session )
load ( Sonata\Component\Customer\CustomerInterface $customer )
reset ( Sonata\Component\Basket\BasketInterface $basket, $full = true )
save ( Sonata\Component\Basket\BasketInterface $basket )

Method Details

__construct() public method

public __construct ( Sonata\Component\Basket\BasketManagerInterface $basketManager, Sonata\Component\Basket\BasketBuilderInterface $basketBuilder, Sonata\Component\Currency\CurrencyDetectorInterface $currencyDetector, Symfony\Component\HttpFoundation\Session\SessionInterface $session )
$basketManager Sonata\Component\Basket\BasketManagerInterface
$basketBuilder Sonata\Component\Basket\BasketBuilderInterface
$currencyDetector Sonata\Component\Currency\CurrencyDetectorInterface
$session Symfony\Component\HttpFoundation\Session\SessionInterface

load() public method

public load ( Sonata\Component\Customer\CustomerInterface $customer )
$customer Sonata\Component\Customer\CustomerInterface

reset() public method

public reset ( Sonata\Component\Basket\BasketInterface $basket, $full = true )
$basket Sonata\Component\Basket\BasketInterface

save() public method

public save ( Sonata\Component\Basket\BasketInterface $basket )
$basket Sonata\Component\Basket\BasketInterface

Property Details

$basketBuilder protected_oe property

protected BasketBuilderInterface,Sonata\Component\Basket $basketBuilder
return Sonata\Component\Basket\BasketBuilderInterface

$basketManager protected_oe property

protected BasketManagerInterface,Sonata\Component\Basket $basketManager
return Sonata\Component\Basket\BasketManagerInterface

$currencyDetector protected_oe property

protected CurrencyDetectorInterface,Sonata\Component\Currency $currencyDetector
return Sonata\Component\Currency\CurrencyDetectorInterface

$session protected_oe property

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