# easy-invoice/2.4.1/includes/Interfaces/ClientRepositoryInterface.php

Easy Invoice – Invoice Generator, PDF Quotes &amp; Payments, version 2.4.1. 83 lines.

- Page: https://pluginprobe.com/plugins/easy-invoice/2.4.1/code/includes/Interfaces/ClientRepositoryInterface.php
- Raw: https://pluginprobe.com/plugins/easy-invoice/2.4.1/raw/includes/Interfaces/ClientRepositoryInterface.php
- Modified: 2025-08-14T09:51:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/easy-invoice/2.4.1/code/includes/Interfaces/ClientRepositoryInterface.php#L10-L20`.

```php
<?php
/**
 * Client Repository Interface
 *
 * @package Easy_Invoice
 * @subpackage Interfaces
 */

namespace EasyInvoice\Interfaces;

use EasyInvoice\Models\Client;

/**
 * ClientRepositoryInterface Interface
 * 
 * Defines the contract for client repositories.
 */
interface ClientRepositoryInterface {
    /**
     * Find a client by ID
     *
     * @param int $id The client ID
     * @return Client|null The client model or null if not found
     */
    public function find($id);
    
    /**
     * Get all clients
     *
     * @param array $args Optional arguments to filter the results
     * @return array Array of Client models
     */
    public function all($args = []);
    
    /**
     * Create a new client
     *
     * @param array $data The client data
     * @return Client The created client model
     */
    public function create($data);
    
    /**
     * Update an existing client
     *
     * @param int $id The client ID
     * @param array $data The client data
     * @return Client|null The updated client model or null if not found
     */
    public function update($id, $data);
    
    /**
     * Delete a client
     *
     * @param int $id The client ID
     * @return bool True if successful, false otherwise
     */
    public function delete($id);
    
    /**
     * Find clients by email
     *
     * @param string $email The client email
     * @return array Array of Client models
     */
    public function findByEmail($email);
    
    /**
     * Find clients by company name
     *
     * @param string $business_client_name The company name
     * @return array Array of Client models
     */
    public function findByBusinessClientName($business_client_name);
    
    /**
     * Search clients by name, email, or company
     *
     * @param string $query The search query
     * @return array Array of Client models
     */
    public function search($query);
} 
```
