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 / Providers / InvoiceItemServiceProvider.php

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

56 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Invoice Item Service Provider Class
4 *
5 * @package Easy_Invoice
6 * @subpackage Providers
7 */
8
9 namespace EasyInvoice\Providers;
10
11 use EasyInvoice\Interfaces\InvoiceItemRepositoryInterface;
12 use EasyInvoice\Repositories\InvoiceItemRepository;
13
14 /**
15 * InvoiceItemServiceProvider Class
16 *
17 * Handles registration of invoice item-related services.
18 */
19 class InvoiceItemServiceProvider {
20 /**
21 * The repository instance
22 *
23 * @var InvoiceItemRepositoryInterface
24 */
25 protected static $repository = null;
26
27 /**
28 * Register invoice item services
29 */
30 public function register() {
31 // Register invoice item repository
32 $this->registerInvoiceItemRepository();
33 }
34
35 /**
36 * Register invoice item repository
37 */
38 protected function registerInvoiceItemRepository() {
39 // Create and store the repository instance
40 self::$repository = new InvoiceItemRepository();
41 }
42
43 /**
44 * Get the invoice item repository
45 *
46 * @return InvoiceItemRepositoryInterface The invoice item repository
47 */
48 public static function getInvoiceItemRepository() {
49 // Create the repository if it doesn't exist
50 if (self::$repository === null) {
51 self::$repository = new InvoiceItemRepository();
52 }
53
54 return self::$repository;
55 }
56 }