39 lines
		
	
	
		
			689 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			39 lines
		
	
	
		
			689 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace NoccyLabs\Mercureact;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class Configuration
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    private ?string $publicUrl = null;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    private ?string $jwtSecret = null;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public static function createDefault(): Configuration
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return new Configuration();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function setPublicUrl(string $publicUrl): self
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $this->publicUrl = $publicUrl;
							 | 
						||
| 
								 | 
							
								        return $this;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function getPublicUrl(): ?string
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return $this->publicUrl;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function setJwtSecret(string $secret): self
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $this->jwtSecret = $secret;
							 | 
						||
| 
								 | 
							
								        return $this;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function getJwtSecret(): ?string
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return $this->jwtSecret;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 |