ZenMagick 0.9.8


org.zenmagick.mvc.utils.ZMToolboxHtml
\mvc\toolbox\tools\ZMToolboxHtml.php at line 31

Class ZMToolboxHtml

ZMObject
└─ZMToolboxTool
└─ZMToolboxHtml

public class ZMToolboxHtml
extends ZMToolboxTool

HTML utilities.

Author:
DerManoMann
Version:
$Id: ZMToolboxHtml.php 2610 2009-11-20 02:45:25Z dermanomann $

Fields inherited from org.zenmagick.toolbox.ZMToolboxTool
request_, toolbox_
Fields inherited from org.zenmagick.core.ZMObject
properties_
Method Summary
string

encode(string s, boolean echo)

Encode a given string to valid HTML.

string

more(string s, int max, string more, boolean echo)

Truncate text.

string

text2html(string s)

Convert text based user input into HTML.

Methods inherited from org.zenmagick.toolbox.ZMToolboxTool
getRequest, getToolbox, setRequest, setToolbox
Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Method Detail

\mvc\toolbox\tools\ZMToolboxHtml.php at line 40

encode

public string encode(string s, boolean echo)

Encode a given string to valid HTML.

Parameters:
s - The string to encode.
echo - If true, the escaped string will be echo'ed as well as returned; default is true.
Returns:
The encoded HTML.

\mvc\toolbox\tools\ZMToolboxHtml.php at line 70

more

public string more(string s, int max, string more, boolean echo)

Truncate text.

Parameters:
s - The text.
max - The number of allowed characters; default is 0 for all.
more - Optional string that will be appended to indicate that the text was truncated; default is ....
echo - If true, the escaped string will be echo'ed as well as returned; default is true.
Returns:
The (possibly) truncated text.

\mvc\toolbox\tools\ZMToolboxHtml.php at line 54

text2html

public string text2html(string s)

Convert text based user input into HTML.

Parameters:
s - The input string.
Returns:
HTML formatted text.

ZenMagick 0.9.8