PHP Класс Sonata\Component\Basket\BaseBasketFactory

Автор: Hugo Briand ([email protected])
Наследование: implements Sonata\Component\Basket\BasketFactoryInterface, implements Symfony\Component\Security\Http\Logout\LogoutHandlerInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$basketBuilder Sonata\Component\Basket\BasketBuilderInterface
$basketManager Sonata\Component\Basket\BasketManagerInterface
$currencyDetector Sonata\Component\Currency\CurrencyDetectorInterface
$session Symfony\Component\HttpFoundation\Session\SessionInterface

Открытые методы

Метод Описание
__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 )
logout ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )

Защищенные методы

Метод Описание
clearSession ( Sonata\Component\Customer\CustomerInterface $customer ) Clears the baskets in session.
getFromSession ( Sonata\Component\Customer\CustomerInterface $customer ) : Sonata\Component\Basket\BasketInterface | null Retrieved basket associated with $customer from session.
getSessionVarName ( Sonata\Component\Customer\CustomerInterface $customer = null ) : string Get the name of the session variable.
storeInSession ( Sonata\Component\Basket\BasketInterface $basket ) Stores $basket in session.

Описание методов

__construct() публичный Метод

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

clearSession() защищенный Метод

Clears the baskets in session.
protected clearSession ( Sonata\Component\Customer\CustomerInterface $customer )
$customer Sonata\Component\Customer\CustomerInterface

getFromSession() защищенный Метод

Retrieved basket associated with $customer from session.
protected getFromSession ( Sonata\Component\Customer\CustomerInterface $customer ) : Sonata\Component\Basket\BasketInterface | null
$customer Sonata\Component\Customer\CustomerInterface
Результат Sonata\Component\Basket\BasketInterface | null

getSessionVarName() защищенный Метод

Get the name of the session variable.
protected getSessionVarName ( Sonata\Component\Customer\CustomerInterface $customer = null ) : string
$customer Sonata\Component\Customer\CustomerInterface
Результат string

load() публичный Метод

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

logout() публичный Метод

public logout ( Request $request, Response $response, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface

storeInSession() защищенный Метод

Stores $basket in session.
protected storeInSession ( Sonata\Component\Basket\BasketInterface $basket )
$basket Sonata\Component\Basket\BasketInterface

Описание свойств

$basketBuilder защищенное свойство

protected BasketBuilderInterface,Sonata\Component\Basket $basketBuilder
Результат Sonata\Component\Basket\BasketBuilderInterface

$basketManager защищенное свойство

protected BasketManagerInterface,Sonata\Component\Basket $basketManager
Результат Sonata\Component\Basket\BasketManagerInterface

$currencyDetector защищенное свойство

protected CurrencyDetectorInterface,Sonata\Component\Currency $currencyDetector
Результат Sonata\Component\Currency\CurrencyDetectorInterface

$session защищенное свойство

protected SessionInterface,Symfony\Component\HttpFoundation\Session $session
Результат Symfony\Component\HttpFoundation\Session\SessionInterface