<?phpnamespace App\Service\Checkout;use Symfony\Component\HttpFoundation\RequestStack;use Symfony\Component\HttpFoundation\Session\SessionInterface;class Checkout{ private SessionInterface $session; private $checkout = []; public function __construct(RequestStack $rs) { $this->session = $rs->getSession(); $this->checkout = $this->session->get('checkout'); } public function flush() { $this->session->set('checkout', $this->checkout); } public function clear() { $this->session->set('checkout', []); } /** * Get the value of name */ public function getCheckout(): array { return isset($this->checkout) ? $this->checkout : []; } /** * Get the value of name */ public function getName(): string { return isset($this->checkout['name']) ? (string) $this->checkout['name'] : ''; } /** * Set the value of name * * @return self */ public function setName($name) { $this->checkout['name'] = $name; $this->flush(); return $this; } /** * Get the value of surname */ public function getSurname(): string { return isset($this->checkout['surname']) ? (string) $this->checkout['surname'] : ''; } /** * Set the value of surname * * @return self */ public function setSurname($surname) { $this->checkout['surname'] = $surname; $this->flush(); return $this; } /** * Get the value of gender */ public function getGender(): string { return isset($this->checkout['gender']) ? (string) $this->checkout['gender'] : ''; } /** * Set the value of gender * * @return self */ public function setGender($gender) { $this->checkout['gender'] = $gender; $this->flush(); return $this; } /** * Get the value of email */ public function getEmail(): string { return isset($this->checkout['email']) ? (string) $this->checkout['email'] : ''; } /** * Set the value of email * * @return self */ public function setEmail($email) { $this->checkout['email'] = $email; $this->flush(); return $this; } /** * Get the value of phone */ public function getPhone(): string { return isset($this->checkout['phone']) ? (string) $this->checkout['phone'] : ''; } /** * Set the value of phone * * @return self */ public function setPhone($phone) { $this->checkout['phone'] = $phone; $this->flush(); return $this; } /** * Get the value of key */ public function getKey(): string { return isset($this->checkout['key']) ? (string) $this->checkout['key'] : ''; } /** * Set the value of key * * @return self */ public function setKey($key) { $this->checkout['key'] = $key; $this->flush(); return $this; } /** * Get the value of comment */ public function getComment(): string { return isset($this->checkout['comment']) ? (string) $this->checkout['comment'] : ''; } /** * Set the value of comment * * @return self */ public function setComment($comment) { $this->checkout['comment'] = $comment; $this->flush(); return $this; } /** * Get the value of useraddr */ public function getUseraddr(): string { return isset($this->checkout['useraddr']) ? (string) $this->checkout['useraddr'] : ''; } /** * Set the value of useraddr * * @return self */ public function setUseraddr($useraddr) { $this->checkout['useraddr'] = $useraddr; $this->flush(); return $this; } /** * Get the value of userlat */ public function getUserlat(): string { return isset($this->checkout['userlat']) ? (string) $this->checkout['userlat'] : ''; } /** * Set the value of userlat * * @return self */ public function setUserlat($userlat) { $this->checkout['userlat'] = $userlat; $this->flush(); return $this; } /** * Get the value of userlon */ public function getUserlon(): string { return isset($this->checkout['userlon']) ? (string) $this->checkout['userlon'] : ''; } /** * Set the value of userlon * * @return self */ public function setUserlon($userlon) { $this->checkout['userlon'] = $userlon; $this->flush(); return $this; } /** * Get the value of userflat */ public function getUserflat(): string { return isset($this->checkout['userflat']) ? (string) $this->checkout['userflat'] : ''; } /** * Set the value of userflat * * @return self */ public function setUserflat($userflat) { $this->checkout['userflat'] = $userflat; $this->flush(); return $this; } /** * Get the value of region_fias_id */ public function getRegion_fias_id(): string { return isset($this->checkout['region_fias_id']) ? (string) $this->checkout['region_fias_id'] : ''; } /** * Set the value of region_fias_id * * @return self */ public function setRegion_fias_id($region_fias_id) { $this->checkout['region_fias_id'] = $region_fias_id; $this->flush(); return $this; } /** * Get the value of region_name */ public function getRegion_name(): string { return isset($this->checkout['region_name']) ? (string) $this->checkout['region_name'] : ''; } /** * Set the value of region_fias_id * * @return self */ public function setRegion_name($region_name) { $this->checkout['region_name'] = $region_name; $this->flush(); return $this; } // ------------------- /** * Get the value of region_fias_id */ public function getCity_fias_id(): string { return isset($this->checkout['city_fias_id']) ? (string) $this->checkout['city_fias_id'] : ''; } /** * Set the value of region_fias_id * * @return self */ public function setCity_fias_id($city_fias_id) { $this->checkout['city_fias_id'] = $city_fias_id; $this->flush(); return $this; } /** * Get the value of region_name */ public function getCity_name(): string { return isset($this->checkout['city_name']) ? (string) $this->checkout['city_name'] : ''; } /** * Set the value of region_fias_id * * @return self */ public function setCity_name($city_name) { $this->checkout['city_name'] = $city_name; $this->flush(); return $this; } /** * Get the value of region_name */ public function getCity_post_code(): string { return isset($this->checkout['city_post_code']) ? (string) $this->checkout['city_post_code'] : ''; } /** * Set the value of region_fias_id * * @return self */ public function setCity_post_code($city_post_code) { $this->checkout['city_post_code'] = $city_post_code; $this->flush(); return $this; } // -------------------- /** * Get the value of delivery_id */ public function getDelivery_id(): int { return isset($this->checkout['delivery_id']) ? (int) $this->checkout['delivery_id'] : 0; } /** * Set the value of delivery_id * * @return self */ public function setDelivery_id($delivery_id) { $this->checkout['delivery_id'] = $delivery_id; $this->flush(); return $this; } /** * Get the value of delivery_intname */ public function getDelivery_intname(): string { return isset($this->checkout['delivery_intname']) ? (string) $this->checkout['delivery_intname'] : ''; } /** * Set the value of delivery_intname * * @return self */ public function setDelivery_intname($delivery_intname) { $this->checkout['delivery_intname'] = $delivery_intname; $this->flush(); return $this; } /** * Get the value of delivery_name */ public function getDelivery_name(): string { return isset($this->checkout['delivery_name']) ? (string) $this->checkout['delivery_name'] : ''; } /** * Set the value of delivery_name * * @return self */ public function setDelivery_name($delivery_name) { $this->checkout['delivery_name'] = $delivery_name; $this->flush(); return $this; } /** * Get the value of delivery_post_code */ public function getDelivery_post_code(): string { return isset($this->checkout['delivery_post_code']) ? (string) $this->checkout['delivery_post_code'] : ''; } /** * Set the value of delivery_post_code * * @return self */ public function setDelivery_post_code($delivery_post_code) { $this->checkout['delivery_post_code'] = $delivery_post_code; $this->flush(); return $this; } /** * Get the value of delivery_post_name */ public function getDelivery_post_name(): string { return isset($this->checkout['delivery_post_name']) ? (string) $this->checkout['delivery_post_name'] : ''; } /** * Set the value of delivery_post_name * * @return self */ public function setDelivery_post_name($delivery_post_name) { $this->checkout['delivery_post_name'] = $delivery_post_name; $this->flush(); return $this; } /** * Get the value of delivery_post_worktime */ public function getDelivery_post_worktime(): string { return isset($this->checkout['delivery_post_worktime']) ? (string) $this->checkout['delivery_post_worktime'] : ''; } /** * Set the value of delivery_post_worktime * * @return self */ public function setDelivery_post_worktime($delivery_post_worktime) { $this->checkout['delivery_post_worktime'] = $delivery_post_worktime; $this->flush(); return $this; } /** * Get the value of delivery_post_phone */ public function getDelivery_post_phone(): string { return isset($this->checkout['delivery_post_phone']) ? (string) $this->checkout['delivery_post_phone'] : ''; } /** * Set the value of delivery_post_phone * * @return self */ public function setDelivery_post_phone($delivery_post_phone) { $this->checkout['delivery_post_phone'] = $delivery_post_phone; $this->flush(); return $this; } /** * Get the value of delivery_post_email */ public function getDelivery_post_email(): string { return isset($this->checkout['delivery_post_email']) ? (string) $this->checkout['delivery_post_email'] : ''; } /** * Set the value of delivery_post_email * * @return self */ public function setDelivery_post_email($delivery_post_email) { $this->checkout['delivery_post_email'] = $delivery_post_email; $this->flush(); return $this; } /** * Get the value of delivery_sub_id */ public function getDelivery_sub_id(): int { return isset($this->checkout['delivery_sub_id']) ? (int) $this->checkout['delivery_sub_id'] : 0; } /** * Set the value of delivery_sub_id * * @return self */ public function setDelivery_sub_id($delivery_sub_id) { $this->checkout['delivery_sub_id'] = (int) $delivery_sub_id; $this->flush(); return $this; } /** * Get the value of delivery_sub_code */ public function getDelivery_sub_code(): string { return isset($this->checkout['delivery_sub_code']) ? (string) $this->checkout['delivery_sub_code'] : ''; } /** * Set the value of delivery_sub_code * * @return self */ public function setDelivery_sub_code($delivery_sub_code) { $this->checkout['delivery_sub_code'] = $delivery_sub_code; $this->flush(); return $this; } /** * Get the value of delivery_sub_name */ public function getDelivery_sub_name(): string { return isset($this->checkout['delivery_sub_name']) ? (string) $this->checkout['delivery_sub_name'] : ''; } /** * Set the value of delivery_sub_name * * @return self */ public function setDelivery_sub_name($delivery_sub_name) { $this->checkout['delivery_sub_name'] = $delivery_sub_name; $this->flush(); return $this; } /** * Get the value of delivery_cost */ public function getDelivery_cost(): float { return isset($this->checkout['delivery_cost']) ? (float) $this->checkout['delivery_cost'] : 0; } /** * Set the value of delivery_cost * * @return self */ public function setDelivery_cost($delivery_cost) { $this->checkout['delivery_cost'] = $delivery_cost; $this->flush(); return $this; } /** * Get the value of payment_id */ public function getPayment_id(): int { return isset($this->checkout['payment_id']) ? (int) $this->checkout['payment_id'] : 0; } /** * Set the value of payment_id * * @return self */ public function setPayment_id($payment_id) { $this->checkout['payment_id'] = $payment_id; $this->flush(); return $this; } /** * Get the value of payment_name */ public function getPayment_name(): string { return isset($this->checkout['payment_name']) ? (string) $this->checkout['payment_name'] : ''; } /** * Set the value of payment_name * * @return self */ public function setPayment_name($payment_name) { $this->checkout['payment_name'] = $payment_name; $this->flush(); return $this; } /** * Get the value of lastordertime */ public function getLastOrderTime(): int { return isset($this->checkout['lastordertime']) ? (int) $this->checkout['lastordertime'] : 0; } /** * Set the value of lastordertime * * @return self */ public function setLastOrderTime($lastordertime) { $this->checkout['lastordertime'] = $lastordertime; $this->flush(); return $this; } /** * Get the value of remarking_cart */ public function getRemarkingCart(): int { return isset($this->checkout['remarking_cart']) ? (int) $this->checkout['remarking_cart'] : 0; } /** * Set the value of remarking_cart * * @return self */ public function setRemarkingCart($remarking_cart) { $this->checkout['remarking_cart'] = $remarking_cart; $this->flush(); return $this; } /** * Get the value of company_nip */ public function getCompanyNip(): string { return isset($this->checkout['company_nip']) ? (string) $this->checkout['company_nip'] : ''; } /** * Set the value of company_nip * * @return self */ public function setCompanyNip($company_nip) { $this->checkout['company_nip'] = $company_nip; $this->flush(); return $this; } /** * Get the value of company_name */ public function getCompanyName(): string { return isset($this->checkout['company_name']) ? (string) $this->checkout['company_name'] : ''; } /** * Set the value of company_name * * @return self */ public function setCompanyName($company_name) { $this->checkout['company_name'] = $company_name; $this->flush(); return $this; } /** * Get the value of company_index */ public function getCompanyIndex(): string { return isset($this->checkout['company_index']) ? (string) $this->checkout['company_index'] : ''; } /** * Set the value of company_index * * @return self */ public function setCompanyIndex($company_index) { $this->checkout['company_index'] = $company_index; $this->flush(); return $this; } /** * Get the value of company_city */ public function getCompanyCity(): string { return isset($this->checkout['company_city']) ? (string) $this->checkout['company_city'] : ''; } /** * Set the value of company_city * * @return self */ public function setCompanyCity($company_city) { $this->checkout['company_city'] = $company_city; $this->flush(); return $this; } /** * Get the value of company_street */ public function getCompanyStreet(): string { return isset($this->checkout['company_street']) ? (string) $this->checkout['company_street'] : ''; } /** * Set the value of company_street * * @return self */ public function setCompanyStreet($company_street) { $this->checkout['company_street'] = $company_street; $this->flush(); return $this; } /** * Get the value of company_house */ public function getCompanyHouse(): string { return isset($this->checkout['company_house']) ? (string) $this->checkout['company_house'] : ''; } /** * Set the value of company_house * * @return self */ public function setCompanyHouse($company_house) { $this->checkout['company_house'] = $company_house; $this->flush(); return $this; } /** * Get the value of company_flat */ public function getCompanyFlat(): string { return isset($this->checkout['company_flat']) ? (string) $this->checkout['company_flat'] : ''; } /** * Set the value of company_flat * * @return self */ public function setCompanyFlat($company_flat) { $this->checkout['company_flat'] = $company_flat; $this->flush(); return $this; } /** * Get the value of ads */ public function getAds(): int { return isset($this->checkout['ads']) ? (string) $this->checkout['ads'] : 0; } /** * Set the value of ads * * @return self */ public function setAds($ads) { $this->checkout['ads'] = (int)$ads; $this->flush(); return $this; }}