1 <?php
2 /* --------------------------------------------------------------
3 CustomerRepositoryInterface.php 2015-02-18 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 /**
13 * Interface CustomerRepositoryInterface
14 *
15 * @category System
16 * @package Customer
17 * @subpackage Interfaces
18 */
19 interface CustomerRepositoryInterface
20 {
21 /**
22 * Creates a new customer.
23 *
24 * @return Customer Newly created customer.
25 */
26 public function getNewCustomer();
27
28
29 /**
30 * Stores customer data in the database.
31 *
32 * @param CustomerInterface $customer Customer.
33 */
34 public function store(CustomerInterface $customer);
35
36
37 /**
38 * Finds a registered customer based on the e-mail address.
39 *
40 * @param CustomerEmailInterface $email Customer's E-Mail address.
41 *
42 * @return Customer|null Customer or null if not found.
43 */
44 public function getRegistreeByEmail(CustomerEmailInterface $email);
45
46
47 /**
48 * Deletes a guest account by its email address.
49 *
50 * @param CustomerEmailInterface $email Guest customer's E-Mail address.
51 */
52 public function deleteGuestByEmail(CustomerEmailInterface $email);
53
54
55 /**
56 * Returns a guest account by its email address.
57 *
58 * @param CustomerEmailInterface $email Guest customer's E-Mail address.
59 *
60 * @return Customer|null Customer or null if not found.
61 */
62 public function getGuestByEmail(CustomerEmailInterface $email);
63 }