Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
CustomerRepositoryInterface Interface Reference
Inheritance diagram for CustomerRepositoryInterface:
CustomerRepository

Public Member Functions

 save (\Magento\Customer\Api\Data\CustomerInterface $customer, $passwordHash=null)
 
 get ($email, $websiteId=null)
 
 getById ($customerId)
 
 getList (\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
 
 delete (\Magento\Customer\Api\Data\CustomerInterface $customer)
 
 deleteById ($customerId)
 

Detailed Description

Customer CRUD interface. @api

Since
100.0.2

Definition at line 15 of file CustomerRepositoryInterface.php.

Member Function Documentation

◆ delete()

Delete customer.

Parameters
\Magento\Customer\Api\Data\CustomerInterface$customer
Returns
bool true on success
Exceptions

◆ deleteById()

deleteById (   $customerId)

Delete customer by Customer ID.

Parameters
int$customerId
Returns
bool true on success
Exceptions

Implemented in CustomerRepository.

◆ get()

get (   $email,
  $websiteId = null 
)

Retrieve customer.

Parameters
string$email
int | null$websiteId
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

Implemented in CustomerRepository.

◆ getById()

getById (   $customerId)

Get customer by Customer ID.

Parameters
int$customerId
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

Implemented in CustomerRepository.

◆ getList()

getList ( \Magento\Framework\Api\SearchCriteriaInterface  $searchCriteria)

Retrieve customers which match a specified criteria.

This call returns an array of objects, but detailed information about each object’s attributes might not be included. See http://devdocs.magento.com/codelinks/attributes.html#CustomerRepositoryInterface to determine which call to use to get detailed information about all attributes for an object.

Parameters
\Magento\Framework\Api\SearchCriteriaInterface$searchCriteria
Returns
\Magento\Customer\Api\Data\CustomerSearchResultsInterface
Exceptions

◆ save()

save ( \Magento\Customer\Api\Data\CustomerInterface  $customer,
  $passwordHash = null 
)

Create or update a customer.

Parameters
\Magento\Customer\Api\Data\CustomerInterface$customer
string$passwordHash
Returns
\Magento\Customer\Api\Data\CustomerInterface
Exceptions

The documentation for this interface was generated from the following file: