public static function escape($value, array $options = array()) {
        $options = $options + array(
            'encoding' => 'UTF-8',
            'flags' => ENT_QUOTES,
            'double' => false
        );

        return htmlentities($value, $options['flags'], $options['encoding'], $options['double']);
    }
public static function escape($value, array $options = array()) {
        $options = $options + array(
            'encoding' => 'UTF-8',
            'flags' => ENT_QUOTES,
            'double' => false
        );

        return htmlentities($value, $options['flags'], $options['encoding'], $options['double']);
    }
public static function escape ( $ value , array $ options = array ( ) ) { $ options = $ options + array ( 'encoding' => 'UTF-8' , 'flags' => ENT_QUOTES , 'double' => false ) ; return htmlentities ( $ value , $ options [ 'flags' ] , $ options [ 'encoding' ] , $ options [ 'double' ] ) ; }
Escape a string using the apps encoding.

@param string $value
@param array $options {
@type string $encoding  Character encoding set; defaults to UTF-8
@type int $flags        Encoding flags; defaults to ENT_QUOTES
@type bool $double      Will double escape existing entities
}
@return string
Escape a string using the apps encoding .