public function escape(string $target = EscapeTarget::HTML)
    {
        switch ($target) {
            case EscapeTarget::ATTRIBUTE:
                return $this->escapeAttribute();
            case EscapeTarget::JS:
                return $this->escapeJS();
            case EscapeTarget::HTML:
            default:
                return $this->escapeHTML();
        }
    }
public function escape(string $target = EscapeTarget::HTML)
    {
        switch ($target) {
            case EscapeTarget::ATTRIBUTE:
                return $this->escapeAttribute();
            case EscapeTarget::JS:
                return $this->escapeJS();
            case EscapeTarget::HTML:
            default:
                return $this->escapeHTML();
        }
    }
public function escape ( string $ target = EscapeTarget :: HTML ) { switch ( $ target ) { case EscapeTarget :: ATTRIBUTE : return $ this -> escapeAttribute ( ) ; case EscapeTarget :: JS : return $ this -> escapeJS ( ) ; case EscapeTarget :: HTML : default : return $ this -> escapeHTML ( ) ; } }
Get an escaped version of the value.

@since 0.1.0

@param string $target Optional. Escaping target to use. Defaults to HTML.

@return mixed Sanitized version of the value.
Get an escaped version of the value .