PersonalDataService
in package
implements
PersonalDataServiceInterface
Class PersonalDataService
Interfaces, Classes and Traits
- PersonalDataServiceInterface
- Interface PersonalDataServiceInterface
Table of Contents
- $addressBookService : AddressBookService
- $agreementReadService : AgreementReadServiceInterface
- $agreementWriteService : AgreementWriteServiceInterface
- $customerReadService : CustomerReadServiceInterface
- $customerService : CustomerService
- $emailService : EmailServiceInterface
- $invoiceArchiveReadService : InvoiceArchiveReadServiceInterface
- $invoiceArchiveWriteService : InvoiceArchiveWriteServiceInterface
- $invoiceFileStorage : PersonalDataInvoiceFileStorageInterface
- $newsletterSubscriptionService : NewsletterSubscriptionServiceInterface
- $orderReadService : OrderReadServiceInterface
- $orderWriteService : OrderWriteServiceInterface
- $packingSlipFileStorage : PersonalDataPackingSlipFileStorageInterface
- $packingSlipService : PackingSlipServiceInterface
- $reviewReadService : ReviewReadServiceInterface
- $reviewWriteService : ReviewWriteServiceInterface
- $serviceSettings : PersonalDataServiceSettingsInterface
- $sharedShoppingCartService : SharedShoppingCartServiceInterface
- $shoppingCartService : ShoppingCartServiceInterface
- $withdrawalReadService : WithdrawalReadServiceInterface
- $withdrawalWriteService : WithdrawalWriteServiceInterface
- $xmlSerializer : PersonalDataXmlSerializer
- $customerFactory : CustomerFactory
- $eventDispatcher : EventDispatcherInterface
- $withdrawalFactory : WithdrawalFactory
- __construct() : mixed
- PersonalDataService constructor.
- deletePersonalDataByCustomerId() : mixed
- Deletes all data for a given customer. The following personal data will be deleted:
- exportPersonalDataByCustomerId() : string
- Exports all personal data of a given customer as XML including the following data:
- setInvoiceArchiveReadService() : mixed
- setInvoiceArchiveWriteService() : mixed
- setPackingSlipService() : mixed
- buildZipFile() : mixed
- copyFilesToExport() : mixed
- createCustomerDirectory() : mixed
- createXmlFile() : mixed
- createZipFile() : mixed
- deleteAddressesByCustomer() : mixed
- deleteAgreementsByCustomer() : mixed
- deleteCustomerById() : mixed
- deleteEmailsByCustomerEmailAddress() : mixed
- deleteInvoicesByCustomerId() : mixed
- deleteNewsletterSubscriptionByCustomerEmail() : mixed
- deleteOrdersByOrderList() : mixed
- deletePackingSlipsByOrderList() : mixed
- deleteReviewsByCustomerId() : mixed
- deleteSharedShoppingCartsByCustomerId() : mixed
- deleteShoppingCartsByCustomerId() : mixed
- deleteWithdrawalsByOrderList() : mixed
- getAddressesByCustomer() : array<string|int, mixed>
- getAgreementsByCustomer() : AgreementCollection
- getCustomerById() : Customer
- getEmailsByCustomerEmailAddress() : EmailCollection
- getInvoicesByCustomerId() : InvoiceListItemCollection
- getNewsletterSubscriptionByCustomerEmail() : bool|NewsletterSubscription
- getOrderListByCustomerId() : OrderListItemCollection
- getOrdersByOrderList() : mixed
- getPackingSlipsByOrderList() : PackingSlipCollection
- getReviewsByCustomerId() : ReviewCollection
- getSharedShoppingCartsByCustomerId() : SharedShoppingCartCollection
- getShoppingCartsByCustomerId() : ShoppingCartCollection
- getWithdrawalsByOrderList() : WithdrawalCollection
- createCustomerDeletedEvent() : CustomerDeleted
- createWithdrawalDeletedEvent() : WithdrawalDeleted
Properties
$addressBookService
protected
AddressBookService
$addressBookService
$agreementReadService
protected
AgreementReadServiceInterface
$agreementReadService
$agreementWriteService
protected
AgreementWriteServiceInterface
$agreementWriteService
$customerReadService
protected
CustomerReadServiceInterface
$customerReadService
$customerService
protected
CustomerService
$customerService
$emailService
protected
EmailServiceInterface
$emailService
$invoiceArchiveReadService
protected
InvoiceArchiveReadServiceInterface
$invoiceArchiveReadService
$invoiceArchiveWriteService
protected
InvoiceArchiveWriteServiceInterface
$invoiceArchiveWriteService
$invoiceFileStorage
protected
PersonalDataInvoiceFileStorageInterface
$invoiceFileStorage
$newsletterSubscriptionService
protected
NewsletterSubscriptionServiceInterface
$newsletterSubscriptionService
$orderReadService
protected
OrderReadServiceInterface
$orderReadService
$orderWriteService
protected
OrderWriteServiceInterface
$orderWriteService
$packingSlipFileStorage
protected
PersonalDataPackingSlipFileStorageInterface
$packingSlipFileStorage
$packingSlipService
protected
PackingSlipServiceInterface
$packingSlipService
$reviewReadService
protected
ReviewReadServiceInterface
$reviewReadService
$reviewWriteService
protected
ReviewWriteServiceInterface
$reviewWriteService
$serviceSettings
protected
PersonalDataServiceSettingsInterface
$serviceSettings
$sharedShoppingCartService
protected
SharedShoppingCartServiceInterface
$sharedShoppingCartService
$shoppingCartService
protected
ShoppingCartServiceInterface
$shoppingCartService
$withdrawalReadService
protected
WithdrawalReadServiceInterface
$withdrawalReadService
$withdrawalWriteService
protected
WithdrawalWriteServiceInterface
$withdrawalWriteService
$xmlSerializer
protected
PersonalDataXmlSerializer
$xmlSerializer
$customerFactory
private
CustomerFactory
$customerFactory
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$withdrawalFactory
private
WithdrawalFactory
$withdrawalFactory
Methods
__construct()
PersonalDataService constructor.
public
__construct(OrderReadServiceInterface $orderReadService, OrderWriteServiceInterface $orderWriteService, CustomerReadService $customerReadService, CustomerService $customerService, EmailServiceInterface $emailService, WithdrawalReadServiceInterface $withdrawalReadService, WithdrawalWriteServiceInterface $withdrawalWriteService, ReviewReadServiceInterface $reviewReadService, ReviewWriteServiceInterface $reviewWriteService, ShoppingCartServiceInterface $shoppingCartService, SharedShoppingCartServiceInterface $sharedShoppingCartService, NewsletterSubscriptionServiceInterface $newsletterSubscriptionService, AddressBookService $addressBookService, AgreementWriteServiceInterface $agreementWriteService, AgreementReadServiceInterface $agreementReadService, PersonalDataInvoiceFileStorageInterface $invoiceFileStorage, PersonalDataPackingSlipFileStorageInterface $packingSlipFileStorage, PersonalDataServiceSettingsInterface $serviceSettings, PersonalDataXmlSerializer $xmlSerializer) : mixed
Parameters
- $orderReadService : OrderReadServiceInterface
- $orderWriteService : OrderWriteServiceInterface
- $customerReadService : CustomerReadService
- $customerService : CustomerService
- $emailService : EmailServiceInterface
- $withdrawalReadService : WithdrawalReadServiceInterface
- $withdrawalWriteService : WithdrawalWriteServiceInterface
- $reviewReadService : ReviewReadServiceInterface
- $reviewWriteService : ReviewWriteServiceInterface
- $shoppingCartService : ShoppingCartServiceInterface
- $sharedShoppingCartService : SharedShoppingCartServiceInterface
- $newsletterSubscriptionService : NewsletterSubscriptionServiceInterface
- $addressBookService : AddressBookService
- $agreementWriteService : AgreementWriteServiceInterface
- $agreementReadService : AgreementReadServiceInterface
- $invoiceFileStorage : PersonalDataInvoiceFileStorageInterface
- $packingSlipFileStorage : PersonalDataPackingSlipFileStorageInterface
- $serviceSettings : PersonalDataServiceSettingsInterface
- $xmlSerializer : PersonalDataXmlSerializer
Return values
mixed —deletePersonalDataByCustomerId()
Deletes all data for a given customer. The following personal data will be deleted:
public
deletePersonalDataByCustomerId(IdType $customerId, PersonalDataSelection $selection) : mixed
- base data
- addresses
- orders
- invoices
- packing slips
- withdrawals
- agreements
- emails
- shopping carts
- shared shopping carts
- reviews
- newsletter subscriptions
Parameters
- $customerId : IdType
-
Customer ID
- $selection : PersonalDataSelection
-
Personal data selection
Return values
mixed —exportPersonalDataByCustomerId()
Exports all personal data of a given customer as XML including the following data:
public
exportPersonalDataByCustomerId(IdType $customerId, PersonalDataSelection $selection) : string
- base data
- addresses
- orders
- invoices
- packing slips
- withdrawals
- agreements
- emails
- shopping carts
- shared shopping carts
- reviews
- newsletter subscriptions
The XML file and all invoices and packing slips of the customer are compressed to a ZIP file. The path to the ZIP file is then returned.
Parameters
- $customerId : IdType
- $selection : PersonalDataSelection
-
Personal data selection
Tags
Return values
string —.
setInvoiceArchiveReadService()
public
setInvoiceArchiveReadService(InvoiceArchiveReadServiceInterface $invoiceArchiveReadService) : mixed
Parameters
- $invoiceArchiveReadService : InvoiceArchiveReadServiceInterface
Return values
mixed —setInvoiceArchiveWriteService()
public
setInvoiceArchiveWriteService(InvoiceArchiveWriteServiceInterface $invoiceArchiveWriteService) : mixed
Parameters
- $invoiceArchiveWriteService : InvoiceArchiveWriteServiceInterface
Return values
mixed —setPackingSlipService()
public
setPackingSlipService(PackingSlipServiceInterface $packingSlipService) : mixed
Parameters
- $packingSlipService : PackingSlipServiceInterface
Return values
mixed —buildZipFile()
protected
buildZipFile(StringType $customerHash, StringType $xmlString, ExistingFileCollection $invoices, ExistingFileCollection $packingSlips) : mixed
Parameters
- $customerHash : StringType
- $xmlString : StringType
- $invoices : ExistingFileCollection
- $packingSlips : ExistingFileCollection
Tags
Return values
mixed —copyFilesToExport()
protected
copyFilesToExport(StringType $directoryPath, ExistingFileCollection $files) : mixed
Parameters
- $directoryPath : StringType
- $files : ExistingFileCollection
Return values
mixed —createCustomerDirectory()
protected
createCustomerDirectory(StringType $directoryPath) : mixed
Parameters
- $directoryPath : StringType
Tags
Return values
mixed —createXmlFile()
protected
createXmlFile(StringType $directoryPath, StringType $xmlString) : mixed
Parameters
- $directoryPath : StringType
- $xmlString : StringType
Return values
mixed —createZipFile()
protected
createZipFile(StringType $directoryPath, StringType $customerHash) : mixed
Parameters
- $directoryPath : StringType
- $customerHash : StringType
Return values
mixed —deleteAddressesByCustomer()
protected
deleteAddressesByCustomer(CustomerInterface $customer) : mixed
Parameters
- $customer : CustomerInterface
Return values
mixed —deleteAgreementsByCustomer()
protected
deleteAgreementsByCustomer(CustomerInterface $customer) : mixed
Parameters
- $customer : CustomerInterface
Return values
mixed —deleteCustomerById()
protected
deleteCustomerById(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Return values
mixed —deleteEmailsByCustomerEmailAddress()
protected
deleteEmailsByCustomerEmailAddress(CustomerEmail $customerEmail) : mixed
Parameters
- $customerEmail : CustomerEmail
Return values
mixed —deleteInvoicesByCustomerId()
protected
deleteInvoicesByCustomerId(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Tags
Return values
mixed —deleteNewsletterSubscriptionByCustomerEmail()
protected
deleteNewsletterSubscriptionByCustomerEmail(CustomerEmailInterface $email) : mixed
Parameters
- $email : CustomerEmailInterface
Return values
mixed —deleteOrdersByOrderList()
protected
deleteOrdersByOrderList(OrderListItemCollection $orderList) : mixed
Parameters
- $orderList : OrderListItemCollection
Tags
Return values
mixed —deletePackingSlipsByOrderList()
protected
deletePackingSlipsByOrderList(OrderListItemCollection $orderList) : mixed
Parameters
- $orderList : OrderListItemCollection
Tags
Return values
mixed —deleteReviewsByCustomerId()
protected
deleteReviewsByCustomerId(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Return values
mixed —deleteSharedShoppingCartsByCustomerId()
protected
deleteSharedShoppingCartsByCustomerId(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Return values
mixed —deleteShoppingCartsByCustomerId()
protected
deleteShoppingCartsByCustomerId(IdType $customerId) : mixed
Parameters
- $customerId : IdType
Return values
mixed —deleteWithdrawalsByOrderList()
protected
deleteWithdrawalsByOrderList(OrderListItemCollection $orderList) : mixed
Parameters
- $orderList : OrderListItemCollection
Return values
mixed —getAddressesByCustomer()
protected
getAddressesByCustomer(Customer $customer) : array<string|int, mixed>
Parameters
- $customer : Customer
Return values
array<string|int, mixed> —getAgreementsByCustomer()
protected
getAgreementsByCustomer(CustomerInterface $customer) : AgreementCollection
Parameters
- $customer : CustomerInterface
Return values
AgreementCollection —getCustomerById()
protected
getCustomerById(IdType $customerId) : Customer
Parameters
- $customerId : IdType
Return values
Customer —getEmailsByCustomerEmailAddress()
protected
getEmailsByCustomerEmailAddress(CustomerEmail $email) : EmailCollection
Parameters
- $email : CustomerEmail
Return values
EmailCollection —getInvoicesByCustomerId()
protected
getInvoicesByCustomerId(IdType $customerId) : InvoiceListItemCollection
Parameters
- $customerId : IdType
Return values
InvoiceListItemCollection —getNewsletterSubscriptionByCustomerEmail()
protected
getNewsletterSubscriptionByCustomerEmail(CustomerEmail $email) : bool|NewsletterSubscription
Parameters
- $email : CustomerEmail
Return values
bool|NewsletterSubscription —getOrderListByCustomerId()
protected
getOrderListByCustomerId(IdType $customerId) : OrderListItemCollection
Parameters
- $customerId : IdType
Return values
OrderListItemCollection —getOrdersByOrderList()
protected
getOrdersByOrderList(OrderListItemCollection $orderList) : mixed
Parameters
- $orderList : OrderListItemCollection
Return values
mixed —getPackingSlipsByOrderList()
protected
getPackingSlipsByOrderList(OrderListItemCollection $orders) : PackingSlipCollection
Parameters
- $orders : OrderListItemCollection
Return values
PackingSlipCollection —getReviewsByCustomerId()
protected
getReviewsByCustomerId(IdType $customerId) : ReviewCollection
Parameters
- $customerId : IdType
Return values
ReviewCollection —getSharedShoppingCartsByCustomerId()
protected
getSharedShoppingCartsByCustomerId(IdType $customerId) : SharedShoppingCartCollection
Parameters
- $customerId : IdType
Return values
SharedShoppingCartCollection —getShoppingCartsByCustomerId()
protected
getShoppingCartsByCustomerId(IdType $customerId) : ShoppingCartCollection
Parameters
- $customerId : IdType
Return values
ShoppingCartCollection —getWithdrawalsByOrderList()
protected
getWithdrawalsByOrderList(OrderListItemCollection $orderList) : WithdrawalCollection
Parameters
- $orderList : OrderListItemCollection
Return values
WithdrawalCollection —createCustomerDeletedEvent()
private
createCustomerDeletedEvent(IdType $customerId) : CustomerDeleted
Parameters
- $customerId : IdType
Return values
CustomerDeleted —createWithdrawalDeletedEvent()
private
createWithdrawalDeletedEvent(IdType $withdrawalId) : WithdrawalDeleted
Parameters
- $withdrawalId : IdType