PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.0
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 / RepositoryInterface.php

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

65 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Repository Interface
4 *
5 * @package Easy_Invoice
6 * @subpackage Interfaces
7 */
8
9 namespace EasyInvoice\Interfaces;
10
11 /**
12 * Repository Interface
13 *
14 * Defines the contract for repository classes.
15 */
16 interface RepositoryInterface {
17 /**
18 * Find a model by ID
19 *
20 * @param int $id The ID to find
21 * @return mixed The model or null if not found
22 */
23 public function find($id);
24
25 /**
26 * Get all models
27 *
28 * @param array $args Optional arguments to filter the results
29 * @return array Array of models
30 */
31 public function all($args = []);
32
33 /**
34 * Create a new model
35 *
36 * @param array $data The data to create the model with
37 * @return mixed The created model
38 */
39 public function create($data);
40
41 /**
42 * Update an existing model
43 *
44 * @param int $id The ID of the model to update
45 * @param array $data The data to update the model with
46 * @return mixed The updated model
47 */
48 public function update($id, $data);
49
50 /**
51 * Delete a model
52 *
53 * @param int $id The ID of the model to delete
54 * @return bool True if successful, false otherwise
55 */
56 public function delete($id);
57
58 /**
59 * Count models
60 *
61 * @param array $args Optional arguments to filter the results
62 * @return int The count of models
63 */
64 public function count($args = []);
65 }