| 1 | <?php |
||
| 9 | class CustomersRepository |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Customer Model instance |
||
| 13 | * |
||
| 14 | * @var mixed |
||
| 15 | **/ |
||
| 16 | public $customer; |
||
| 17 | /** |
||
| 18 | * Create a new instance of the CustomerRepository::class |
||
| 19 | * |
||
| 20 | **/ |
||
| 21 | |||
| 22 | public function __construct(Customer $customer) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Find a customer by a field |
||
| 29 | * |
||
| 30 | * @return mixid $this |
||
| 31 | **/ |
||
| 32 | public function findCustomer($key, $value) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Create Customer with the received response |
||
| 39 | * |
||
| 40 | * @return object Customer |
||
| 41 | * @param array $data |
||
| 42 | **/ |
||
| 43 | public function createCustomer($data) |
||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | } |