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

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

- Page: https://pluginprobe.com/plugins/easy-invoice/2.4.1/code/includes/Interfaces/RepositoryInterface.php
- Raw: https://pluginprobe.com/plugins/easy-invoice/2.4.1/raw/includes/Interfaces/RepositoryInterface.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/RepositoryInterface.php#L10-L20`.

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

namespace EasyInvoice\Interfaces;

/**
 * Repository Interface
 * 
 * Defines the contract for repository classes.
 */
interface RepositoryInterface {
    /**
     * Find a model by ID
     *
     * @param int $id The ID to find
     * @return mixed The model or null if not found
     */
    public function find($id);

    /**
     * Get all models
     *
     * @param array $args Optional arguments to filter the results
     * @return array Array of models
     */
    public function all($args = []);

    /**
     * Create a new model
     *
     * @param array $data The data to create the model with
     * @return mixed The created model
     */
    public function create($data);

    /**
     * Update an existing model
     *
     * @param int $id The ID of the model to update
     * @param array $data The data to update the model with
     * @return mixed The updated model
     */
    public function update($id, $data);

    /**
     * Delete a model
     *
     * @param int $id The ID of the model to delete
     * @return bool True if successful, false otherwise
     */
    public function delete($id);

    /**
     * Count models
     *
     * @param array $args Optional arguments to filter the results
     * @return int The count of models
     */
    public function count($args = []);
} 
```
