PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.4
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.4
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 / QuoteServiceProvider.php

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

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