/** * @inheritDoc */ public function save(CustomerView $view) { $this->client->hmset(self::KEY . ':' . $view->getId(), ['id' => $view->getId(), 'email' => $view->getEmail(), 'country' => $view->getCountry(), 'city' => $view->getCity(), 'street' => $view->getStreet(), 'zipCode' => $view->getZipCode()]); }
/** * @param CustomerView $customer * @return \Symfony\Component\Form\FormInterface */ private function getOrderForm(CustomerView $customer) { return $form = $this->formFactory->create('Shop\\Presentation\\Form\\OrderType', new CreateOrderCommand(new Address($customer->getCountry(), $customer->getCity(), $customer->getStreet(), $customer->getZipCode()))); }
/** * @param CustomerView $customer * @return \Symfony\Component\Form\FormInterface */ private function createForm($customer) { $form = $this->formFactory->create('Shop\\Presentation\\Form\\ProfileType', new UpdateProfileCommand(new Address($customer->getCountry(), $customer->getCity(), $customer->getStreet(), $customer->getZipCode()))); return $form; }