Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractCustomerServiceFactory
  • Customer
  • CustomerDeleter
  • CustomerFactory
  • CustomerReader
  • CustomerReadService
  • CustomerRepository
  • CustomerService
  • CustomerServiceFactory
  • CustomerWriter
  • CustomerWriteService

Class CustomerRepository

Class CustomerRepository

This class contains basic methods for finding, creating and deleting customer data

CustomerRepository implements CustomerRepositoryInterface
Package: Customer
Category: System
Implements: CustomerRepositoryInterface
Located at CoreServices/Customer/CustomerRepository.inc.php

Methods summary

public
# __construct( CustomerWriterInterface $customerWriter, CustomerReaderInterface $customerReader, CustomerDeleterInterface $customerDeleter, CustomerAddressRepositoryInterface $customerAddressRepository, AbstractCustomerFactory $customerFactory )

Constructor of the class CustomerRepository.

Constructor of the class CustomerRepository.

Parameters

$customerWriter
Customer writer.
$customerReader
Customer reader.
$customerDeleter
Customer deleter.
$customerAddressRepository
Customer address repository.
$customerFactory
Customer factory.
public Customer
# getNewCustomer( )

Creates a new customer.

Creates a new customer.

Returns

Customer
Newly created customer.

Implementation of

CustomerRepositoryInterface::getNewCustomer()
public
# store( CustomerInterface $customer )

Stores customer data in the database.

Stores customer data in the database.

Parameters

$customer
Customer.

Implementation of

CustomerRepositoryInterface::store()
public CustomerInterface
# getCustomerById( IdType $customerId )

Finds customer data by an ID.

Finds customer data by an ID.

Parameters

$customerId
Customer's ID.

Returns

CustomerInterface

Throws

InvalidArgumentException
If customer has been not found.
public Customer|null
# getRegistreeByEmail( CustomerEmailInterface $email )

Finds a registered customer based on the e-mail address.

Finds a registered customer based on the e-mail address.

Parameters

$email
Customer's E-Mail address.

Returns

Customer|null
Customer or null if not found.

Implementation of

CustomerRepositoryInterface::getRegistreeByEmail()
public
# deleteCustomerById( IdType $customerId )

Deletes the customer by the ID.

Deletes the customer by the ID.

Parameters

$customerId
Customer's ID.
public
# deleteGuestByEmail( CustomerEmailInterface $email )

Deletes a guest account by its email address.

Deletes a guest account by its email address.

Parameters

$email
Guest customer's E-Mail address.

Implementation of

CustomerRepositoryInterface::deleteGuestByEmail()
public Customer|null
# getGuestByEmail( CustomerEmailInterface $email )

Returns a guest account by its email address.

Returns a guest account by its email address.

Parameters

$email
Guest customer's E-Mail address.

Returns

Customer|null
Customer or null if not found.

Implementation of

CustomerRepositoryInterface::getGuestByEmail()
public array
# filterCustomers( array $conditions = array(), integer $limit = null, integer $offset = null )

Filters customer records and returns an array with results.

Filters customer records and returns an array with results.

Example: $repository->filterCustomers('customers_id' => 1);

Parameters

$conditions
Associative array containing the desired field and value.
$limit
Result limit
$offset
Result offset

Returns

array
Returns an array that contains customer objects.

Properties summary

protected CustomerWriterInterface $customerWriter

Customer writer.

Customer writer.

#
protected CustomerReaderInterface $customerReader

Customer reader.

Customer reader.

#
protected CustomerDeleterInterface $customerDeleter

Customer deleter.

Customer deleter.

#
protected CustomerAddressRepositoryInterface $customerAddressRepository

Customer address repository.

Customer address repository.

#
protected AbstractCustomerFactory $customerFactory

Customer factory.

Customer factory.

#
API documentation generated by ApiGen