PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.1
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.1
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / includes / Interfaces / ClientRepositoryInterface.php

ClientRepositoryInterface.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.4.1, at includes/Interfaces/ClientRepositoryInterface.php

83 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Client Repository Interface
4 *
5 * @package Easy_Invoice
6 * @subpackage Interfaces
7 */
8
9 namespace EasyInvoice\Interfaces;
10
11 use EasyInvoice\Models\Client;
12
13 /**
14 * ClientRepositoryInterface Interface
15 *
16 * Defines the contract for client repositories.
17 */
18 interface ClientRepositoryInterface {
19 /**
20 * Find a client by ID
21 *
22 * @param int $id The client ID
23 * @return Client|null The client model or null if not found
24 */
25 public function find($id);
26
27 /**
28 * Get all clients
29 *
30 * @param array $args Optional arguments to filter the results
31 * @return array Array of Client models
32 */
33 public function all($args = []);
34
35 /**
36 * Create a new client
37 *
38 * @param array $data The client data
39 * @return Client The created client model
40 */
41 public function create($data);
42
43 /**
44 * Update an existing client
45 *
46 * @param int $id The client ID
47 * @param array $data The client data
48 * @return Client|null The updated client model or null if not found
49 */
50 public function update($id, $data);
51
52 /**
53 * Delete a client
54 *
55 * @param int $id The client ID
56 * @return bool True if successful, false otherwise
57 */
58 public function delete($id);
59
60 /**
61 * Find clients by email
62 *
63 * @param string $email The client email
64 * @return array Array of Client models
65 */
66 public function findByEmail($email);
67
68 /**
69 * Find clients by company name
70 *
71 * @param string $business_client_name The company name
72 * @return array Array of Client models
73 */
74 public function findByBusinessClientName($business_client_name);
75
76 /**
77 * Search clients by name, email, or company
78 *
79 * @param string $query The search query
80 * @return array Array of Client models
81 */
82 public function search($query);
83 }