feat: add QRCodeOptions provider
feat: add QRCodeOptions provider
This commit is contained in:
		
							parent
							
								
									e89290473b
								
							
						
					
					
						commit
						928ff810e6
					
				@ -28,5 +28,7 @@ services:
 | 
				
			|||||||
            $available_currencies: '%app.currencies%'
 | 
					            $available_currencies: '%app.currencies%'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    App\Service\CurrencyListerInterface: '@App\Service\StaticCurrencyLister'
 | 
					    App\Service\CurrencyListerInterface: '@App\Service\StaticCurrencyLister'
 | 
				
			||||||
 | 
					    App\Service\QRCodeQROptionsProviderInterface: '@App\Service\QRCodeQROptionsDefaultProvider'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # add more service definitions when explicit configuration is needed
 | 
					    # add more service definitions when explicit configuration is needed
 | 
				
			||||||
    # please note that last definitions always *replace* previous ones
 | 
					    # please note that last definitions always *replace* previous ones
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										21
									
								
								src/Service/QRCodeQROptionsDefaultProvider.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/Service/QRCodeQROptionsDefaultProvider.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					declare(strict_types=1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace App\Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use App\Entity\QRCode\QRCodeQROptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					readonly class QRCodeQROptionsDefaultProvider implements QRCodeQROptionsProviderInterface {
 | 
				
			||||||
 | 
					    private readonly QRCodeQROptions $qrCodeDefaultOptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function __construct() {
 | 
				
			||||||
 | 
					        $this->qrCodeDefaultOptions = new QRCodeQROptions(
 | 
				
			||||||
 | 
					            1,
 | 
				
			||||||
 | 
					            0
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function getDefault(): QRCodeQROptions {
 | 
				
			||||||
 | 
					        return $this->qrCodeDefaultOptions;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										10
									
								
								src/Service/QRCodeQROptionsProviderInterface.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/Service/QRCodeQROptionsProviderInterface.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					declare(strict_types=1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace App\Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use App\Entity\QRCode\QRCodeQROptions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface QRCodeQROptionsProviderInterface {
 | 
				
			||||||
 | 
					    public function getDefault(): QRCodeQROptions;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user