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 / InvoiceNumberServiceProvider.php

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

63 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Invoice Number Service Provider
4 *
5 * @package Easy_Invoice
6 * @subpackage Providers
7 */
8
9 namespace EasyInvoice\Providers;
10
11 use EasyInvoice\Services\InvoiceNumberService;
12
13 /**
14 * InvoiceNumberServiceProvider Class
15 *
16 * Handles the registration of invoice number services.
17 */
18 class InvoiceNumberServiceProvider {
19 /**
20 * The service instance
21 *
22 * @var InvoiceNumberService
23 */
24 private $service = null;
25
26 /**
27 * Register invoice number services
28 */
29 public function register() {
30 // Register service providers, load dependencies, etc.
31 $this->registerServices();
32 }
33
34 /**
35 * Register services
36 */
37 protected function registerServices() {
38 // This method would be more useful if you're using a dependency injection container
39 // For now, it's just a placeholder to maintain structure for future expansion
40 }
41
42 /**
43 * Register invoice number service
44 */
45 protected function registerInvoiceNumberService() {
46 // Create and store the service instance
47 $this->service = new InvoiceNumberService();
48 }
49
50 /**
51 * Get the invoice number service
52 *
53 * @return InvoiceNumberService The invoice number service
54 */
55 public function getInvoiceNumberService() {
56 // Create the service if it doesn't exist
57 if ($this->service === null) {
58 $this->service = new InvoiceNumberService();
59 }
60
61 return $this->service;
62 }
63 }