52 lines
		
	
	
		
			1000 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1000 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace NoccyLabs\Mercureact;
 | 
						|
 | 
						|
class Configuration
 | 
						|
{
 | 
						|
    private ?string $publicUrl = null;
 | 
						|
 | 
						|
    private ?string $jwtSecret = null;
 | 
						|
 | 
						|
    private bool $allowAnonymousSubscribe = false;
 | 
						|
 | 
						|
    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;
 | 
						|
    }
 | 
						|
 | 
						|
	function getAllowAnonymousSubscribe():bool
 | 
						|
    {
 | 
						|
		return $this->allowAnonymousSubscribe;
 | 
						|
	}
 | 
						|
 | 
						|
	function setAllowAnonymousSubscribe(bool $allowAnonymousSubscribe): self
 | 
						|
    {
 | 
						|
		$this->allowAnonymousSubscribe = $allowAnonymousSubscribe;
 | 
						|
		return $this;
 | 
						|
    }
 | 
						|
}
 | 
						|
 |