com.caucho.quercus.lib
Class HtmlModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.HtmlModule
All Implemented Interfaces:
QuercusModule

public class HtmlModule
extends AbstractQuercusModule

PHP functions implementing html code.


Field Summary
static int ENT_COMPAT
           
static int ENT_HTML_QUOTE_DOUBLE
           
static int ENT_HTML_QUOTE_NONE
           
static int ENT_HTML_QUOTE_SINGLE
           
static int ENT_NOQUOTES
           
static int ENT_QUOTES
           
static int HTML_ENTITIES
           
static int HTML_SPECIALCHARS
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
HtmlModule()
           
 
Method Summary
 Value get_html_translation_table(Env env, int table, int quoteStyle)
          Returns HTML translation tables.
static StringValue html_entity_decode(Env env, StringValue string, int quoteStyle, java.lang.String charset)
          Escapes HTML
static Value htmlentities(Env env, StringValue string, int quoteStyle, java.lang.String charset)
          Escapes HTML
static StringValue htmlspecialchars_decode(Env env, StringValue str, int quoteStyle)
           
static Value htmlspecialchars(Env env, StringValue string, int quoteStyle, java.lang.String charset)
          Escapes HTML
static Value nl2br(Env env, StringValue string)
          Replaces newlines with HTML breaks.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_SPECIALCHARS

public static final int HTML_SPECIALCHARS
See Also:
Constant Field Values

HTML_ENTITIES

public static final int HTML_ENTITIES
See Also:
Constant Field Values

ENT_HTML_QUOTE_NONE

public static final int ENT_HTML_QUOTE_NONE
See Also:
Constant Field Values

ENT_HTML_QUOTE_SINGLE

public static final int ENT_HTML_QUOTE_SINGLE
See Also:
Constant Field Values

ENT_HTML_QUOTE_DOUBLE

public static final int ENT_HTML_QUOTE_DOUBLE
See Also:
Constant Field Values

ENT_COMPAT

public static final int ENT_COMPAT
See Also:
Constant Field Values

ENT_QUOTES

public static final int ENT_QUOTES
See Also:
Constant Field Values

ENT_NOQUOTES

public static final int ENT_NOQUOTES
See Also:
Constant Field Values
Constructor Detail

HtmlModule

public HtmlModule()
Method Detail

get_html_translation_table

public Value get_html_translation_table(Env env,
                                        int table,
                                        int quoteStyle)
Returns HTML translation tables.


htmlspecialchars_decode

public static StringValue htmlspecialchars_decode(Env env,
                                                  StringValue str,
                                                  int quoteStyle)

htmlspecialchars

public static Value htmlspecialchars(Env env,
                                     StringValue string,
                                     int quoteStyle,
                                     java.lang.String charset)
Escapes HTML

Parameters:
env - the calling environment
string - the string to be trimmed
quoteStyleV - optional quote style
charsetV - optional charset style
Returns:
the trimmed string

htmlentities

public static Value htmlentities(Env env,
                                 StringValue string,
                                 int quoteStyle,
                                 java.lang.String charset)
Escapes HTML

Parameters:
env - the calling environment
stringV - the string to be trimmed
quoteStyleV - optional quote style
charsetV - optional charset style
Returns:
the trimmed string

html_entity_decode

public static StringValue html_entity_decode(Env env,
                                             StringValue string,
                                             int quoteStyle,
                                             java.lang.String charset)
Escapes HTML

Parameters:
string - the string to be trimmed
quoteStyle - optional quote style
charset - optional charset style
Returns:
the trimmed string

nl2br

public static Value nl2br(Env env,
                          StringValue string)
Replaces newlines with HTML breaks.

Parameters:
env - the calling environment