Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CustomerManagement.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Customer\Model;
7 
9 use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory;
10 
12 {
16  protected $customersFactory;
17 
21  public function __construct(CollectionFactory $customersFactory)
22  {
23  $this->customersFactory = $customersFactory;
24  }
25 
29  public function getCount()
30  {
31  $customers = $this->customersFactory->create();
33  return $customers->getSize();
34  }
35 }
__construct(CollectionFactory $customersFactory)