コード例 #1
0
 public function __construct(Wordpress $wp, Factory $factory, Options $options, SessionServiceInterface $sessionService)
 {
     $this->wp = $wp;
     $this->factory = $factory;
     $this->options = $options;
     $this->session = $sessionService->get($sessionService->getCurrentKey());
 }
コード例 #2
0
ファイル: Messages.php プロジェクト: jigoshop/Jigoshop2
 public function __construct(Wordpress $wp, SessionServiceInterface $sessionService)
 {
     $this->session = $sessionService->get($sessionService->getCurrentKey());
     if ($this->session->getField(self::NOTICES)) {
         $this->notices = $this->session->getField(self::NOTICES);
     }
     if ($this->session->getField(self::WARNINGS)) {
         $this->warnings = $this->session->getField(self::WARNINGS);
     }
     if ($this->session->getField(self::ERRORS)) {
         $this->errors = $this->session->getField(self::ERRORS);
     }
     $wp->addAction('shutdown', array($this, 'preserveMessages'), 9);
 }
コード例 #3
0
ファイル: CartService.php プロジェクト: jigoshop/Jigoshop2
 public function __construct(Wordpress $wp, Options $options, CustomerServiceInterface $customerService, ProductServiceInterface $productService, ShippingServiceInterface $shippingService, SessionServiceInterface $sessionService, PaymentServiceInterface $paymentService, OrderFactory $orderFactory)
 {
     $this->wp = $wp;
     $this->options = $options;
     $this->customerService = $customerService;
     $this->productService = $productService;
     $this->shippingService = $shippingService;
     $this->session = $sessionService->get($sessionService->getCurrentKey());
     $this->paymentService = $paymentService;
     $this->orderFactory = $orderFactory;
     if ($this->session->getField(self::CART) == '') {
         $this->session->setField(self::CART, array());
     }
     $this->currentUserCartId = $this->generateCartId();
 }
コード例 #4
0
ファイル: Customer.php プロジェクト: jigoshop/Jigoshop2
 public function __construct(Wordpress $wp, SessionServiceInterface $sessionService)
 {
     $this->wp = $wp;
     $this->session = $sessionService->get($sessionService->getCurrentKey());
 }