1 <?php
2 /* --------------------------------------------------------------
3 CustomerReadServiceInterface.inc.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 CustomerReadServiceInterface
14 *
15 * @category System
16 * @package Customer
17 * @subpackage Interfaces
18 */
19 interface CustomerReadServiceInterface
20 {
21 /**
22 * Finds a customer by an entered ID.
23 *
24 * @param IdType $customerId Customer ID.
25 *
26 * @return Customer Customer.
27 */
28 public function getCustomerById(IdType $customerId);
29
30
31 /**
32 * Checks if the email address of the registree already exists.
33 *
34 * @param CustomerEmailInterface $email Customer's E-Mail address.
35 *
36 * @return bool Does the E-Mail address already exist?
37 */
38 public function registreeEmailExists(CustomerEmailInterface $email);
39
40
41 /**
42 * Checks if address is the default address of the customer.
43 *
44 * @param CustomerAddressInterface $customerAddress Customer's address.
45 *
46 * @return bool Is provided address the customer's default address?
47 */
48 public function addressIsDefaultCustomerAddress(CustomerAddressInterface $customerAddress);
49
50
51 /**
52 * Filters customer records and returns an array with results.
53 *
54 * Example:
55 * $service->filterCustomers('customers_id' => 1);
56 *
57 * @param array $conditions Associative array containing the desired field and value.
58 * @param int $limit MySQL limit applied to the records.
59 * @param int $offset MySQL offset applied to the records.
60 *
61 * @return array Returns an array that contains customer objects.
62 */
63 public function filterCustomers(array $conditions, $limit, $offset);
64 }