public function setSandbox(string $sandbox):void
    {
        if (!in_array($sandbox, self::SANDBOX_VALUES)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "%s is not a correct value for the CSP sandbox, correct values are: %s (see %s)",
                    $sandbox, implode(', ', self::SANDBOX_VALUES),
                    'https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox'
                )
            );
        }
        $this->tags['sandbox'] = $sandbox;
    }
public function setSandbox(string $sandbox):void
    {
        if (!in_array($sandbox, self::SANDBOX_VALUES)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "%s is not a correct value for the CSP sandbox, correct values are: %s (see %s)",
                    $sandbox, implode(', ', self::SANDBOX_VALUES),
                    'https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox'
                )
            );
        }
        $this->tags['sandbox'] = $sandbox;
    }
public function setSandbox ( string $ sandbox ) : void { if ( ! in_array ( $ sandbox , self :: SANDBOX_VALUES ) ) { throw new MiddlewareException ( $ this , sprintf ( "%s is not a correct value for the CSP sandbox, correct values are: %s (see %s)" , $ sandbox , implode ( ', ' , self :: SANDBOX_VALUES ) , 'https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox' ) ) ; } $ this -> tags [ 'sandbox' ] = $ sandbox ; }
Sets the 'sandbox' value of the CSP. See the SANDBOX_XYZ class constants for the possible values.

@link https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox
@param string $sandbox
@throws MiddlewareException
Sets the sandbox value of the CSP . See the SANDBOX_XYZ class constants for the possible values .