CustomerRepository
Magento\Customer\Model\ResourceModel\CustomerRepository
What it does
This class provides CRUD (Create, Read, Update, Delete) operations for customer entities in Magento 2.
Developers use this repository to programmatically manage customers, including saving customer data with addresses, retrieving customers by email or ID, searching customers with filters, and deleting customer accounts.
It serves as the primary service layer for customer data management, handling validation, event dispatching, and secure data processing.
Public Methods
- save()
- get()
- getById()
- getList()
- delete()
- deleteById()