Inheritance diagram for Textile:
Public Member Functions | |
Textile ($options=array()) | |
set ($opt, $value=NULL) | |
get ($opt) | |
disable_html ($disable_html=NULL) | |
head_offset ($head_offset=NULL) | |
flavor ($flavor=NULL) | |
css ($css=NULL) | |
charset ($charset=NULL) | |
docroot ($docroot=NULL) | |
trim_spaces ($trim_spaces=NULL) | |
filter_param ($filter_param=NULL) | |
preserve_spaces ($preserve_spaces=NULL) | |
filters ($filters=NULL) | |
char_encoding ($char_encoding=NULL) | |
handle_quotes ($do_quotes=NULL) | |
process ($str) | |
Static Public Member Functions | |
version () | |
Public Attributes | |
$Have_Entities = 1 | |
Private Member Functions | |
_create_re () | |
format_paragraph ($args) | |
format_inline ($args) | |
format_macro ($attrs) | |
format_cite ($args) | |
format_code ($args) | |
format_classstyle ($clsty=NULL, $class=NULL, $style=NULL) | |
format_tag ($args) | |
format_deflist ($args) | |
add_term ($dt, $dd) | |
format_list ($args) | |
format_block ($args) | |
format_link ($args) | |
format_url ($args) | |
format_span ($args) | |
format_image ($args) | |
format_table ($args) | |
apply_filters ($args) | |
encode_html ($html, $can_double_encode=FALSE) | |
decode_html ($html) | |
encode_html_basic ($html, $can_double_encode=FALSE) | |
image_size ($file) | |
encode_url ($str) | |
mail_encode ($addr) | |
process_quotes ($str) | |
default_macros () | |
_css_defaults () | |
_halign ($align) | |
_valign ($align) | |
_imgalign ($align) | |
_strip_borders (&$pre, &$post) | |
_repl (&$array, $str) | |
_tokenize ($str) | |
_cb ($function) | |
Static Private Member Functions | |
& | _current_store (&$new) |
& | _current () |
Private Attributes | |
$options = array() | |
$urlre | |
$punct | |
$valignre | |
$tblalignre | |
$halignre | |
$alignre | |
$imgalignre | |
$clstypadre | |
$clstyre | |
$clstyfiltre | |
$codere | |
$blocktags | |
$links = array() | |
$repl = array() | |
$tmp = array() |
The Textile class serves as a wrapper for all Textile functionality. It is not inherently necessary that Textile be a class; however, this is as close as one can get to a namespace in PHP. Wrapping the functionality in a class prevents name collisions and dirtying of the global namespace. The Textile class uses no global variables and will not have any side-effects on other code.
Definition at line 30 of file Textile.php.
|
Instantiates a new Textile object. Optional options can be passed to initialize the object. Attributes for the options key are the same as the get/set method names documented here.
Definition at line 186 of file Textile.php. References $options, _create_re(), char_encoding(), charset(), css(), default_macros(), filters(), flavor(), head_offset(), preserve_spaces(), and trim_spaces(). |
|
Creates a custom callback function from the provided PHP code. The result is used as the callback in
Definition at line 3243 of file Textile.php. References _current(), and _current_store(). |
|
Creates the class variable regular expression patterns used by Textile. They are not initialized in the declaration, because some rely on the others, requiring a PHP does not have the Perl qr operator to quote or precompile patterns, so to avoid escaping and matching problems, all patterns must use the same delimiter; this implementation uses {}. Every use of these patterns within this class has been changed to use these delimiters. *JHR* Definition at line 599 of file Textile.php. Referenced by Textile(). |
|
Sets the default CSS names for CSS controlled markup. This is an internal function that should not be called directly. Definition at line 2980 of file Textile.php. |
|
Returns the "current" Textile object. This is used within anonymous callback functions which cannot have the scope of a specific object. *JHR*
Definition at line 3283 of file Textile.php. References _current_store(). Referenced by _cb(). |
|
Stores a static variable for the Textile class. This helper function is used by
Definition at line 3263 of file Textile.php. Referenced by _cb(), and _current(). |
|
Returns the alignment keyword depending on the symbol passed.
Definition at line 3025 of file Textile.php. |
|
Returns the alignment keyword depending on the symbol passed. The following alignment symbols are recognized, and given preference in the order listed:
Definition at line 3109 of file Textile.php. |
|
An internal routine that takes a string and appends it to an array. It returns a marker that is used later to restore the preserved string.
Definition at line 3162 of file Textile.php. |
|
This utility routine will take 'border' characters off of the given $pre starts with '[', $post ends with ']' $pre starts with '{', $post ends with '}'If neither condition is met, then the $pre and $post values are left untouched.
Definition at line 3130 of file Textile.php. |
|
An internal routine responsible for breaking up a string into individual tag and plaintext elements.
Definition at line 3177 of file Textile.php. |
|
Returns the alignment keyword depending on the symbol passed.
Definition at line 3063 of file Textile.php. |
|
Processes a single definition list item from the provided term and definition.
Definition at line 1824 of file Textile.php. |
|
The following attributes are allowed:
Definition at line 2617 of file Textile.php. |
|
Gets or sets the character encoding logical flag. If character encoding is enabled, the htmlentities function is used to encode special characters. If character encoding is disabled, only <, >, " and & are encoded to HTML entities.
Definition at line 558 of file Textile.php. References char_encoding(). Referenced by char_encoding(), charset(), and Textile(). |
|
Gets or sets the character set targetted for publication. At this time, Textile only changes its behavior if the 'utf-8' character set is assigned. Specifically, if utf-8 is requested, any special characters created by Textile will be output as native utf-8 characters rather than HTML entities.
Definition at line 433 of file Textile.php. References char_encoding(), and charset(). |
|
Gets or sets the css support for Textile. If css is enabled, Textile will emit CSS rules. You may pass a 1 or 0 to enable or disable CSS behavior altogether. If you pass an associative array, you may assign the CSS class names that are used by Textile. The following key names for such an array are recognized:
Definition at line 404 of file Textile.php. References _css_defaults(), and css(). |
|
Decodes HTML entities in
Definition at line 2674 of file Textile.php. |
|
Returns an associative
Definition at line 2807 of file Textile.php. Referenced by Textile(). |
|
Gets or sets the "disable html" control, which allows you to prevent HTML tags from being used within the text processed. Any HTML tags encountered will be removed if disable html is enabled. Default behavior is to allow HTML.
Definition at line 269 of file Textile.php. References disable_html(). Referenced by disable_html(). |
|
Gets or sets the physical file path to root of document files. This path is utilized when images are referenced and size calculations are needed (the getimagesize() function is used to read the image dimensions).
Definition at line 458 of file Textile.php. References docroot(). Referenced by docroot(). |
|
Encodes input
Definition at line 2654 of file Textile.php. |
|
Encodes the input
Definition at line 2698 of file Textile.php. |
|
Encodes the query portion of a URL, escaping characters as necessary.
Definition at line 2757 of file Textile.php. |
|
Gets or sets a parameter that is passed to filters.
Definition at line 495 of file Textile.php. References filter_param(). Referenced by filter_param(). |
|
Gets or sets a list of filters to make available for Textile to use. Returns a hash reference of the currently assigned filters.
Definition at line 537 of file Textile.php. References filters(). |
|
Assigns the HTML flavor of output from Textile. Currently these are the valid choices: html, xhtml (behaves like "xhtml1"), xhtml1, xhtml2. Default flavor is "xhtml1". Note that the xhtml2 flavor support is experimental and incomplete (and will remain that way until the XHTML 2.0 draft becomes a proper recommendation).
Definition at line 313 of file Textile.php. References _css_defaults(), css(), and flavor(). |
|
Processes '==xxxxx==' type blocks for filters. A filter would follow the open '==' sequence and is specified within pipe characters, like so: ==|filter|text to be filtered==You may specify multiple filters in the filter portion of the string. Simply comma delimit the filters you desire to execute. Filters are defined using the filters method.
Definition at line 2003 of file Textile.php. |
|
Processes text for a citation tag. The following attributes are allowed:
Definition at line 1570 of file Textile.php. |
|
Returns a string of tag attributes to accomodate the class, style and symbols present in
The attribute string returned will contain any combination of class, id, style and/or lang attributes.
Definition at line 1662 of file Textile.php. |
|
Processes '@...@' type blocks (code snippets). The following attributes are allowed:
Definition at line 1610 of file Textile.php. |
|
Takes a Textile formatted definition list and returns the markup for it. Arguments accepted:
Definition at line 1782 of file Textile.php. |
|
Returns markup for the given image. Arguments you may pass:
Definition at line 2186 of file Textile.php. |
|
Processes an inline string (plaintext) for Textile syntax. The following attributes are allowed:
Definition at line 1298 of file Textile.php. |
|
Takes the Textile link attributes and transforms them into a hyperlink.
Definition at line 2043 of file Textile.php. |
|
Takes a Textile formatted list (numeric or bulleted) and returns the markup for it. Text that is passed in requires substantial parsing, so the
Definition at line 1883 of file Textile.php. |
|
Responsible for processing a particular macro. Arguments passed include:
The return value from this method would be the replacement text for the macro given. If the macro is not defined, it will return pre + macro + post, thereby preserving the original macro string.
Definition at line 1530 of file Textile.php. |
|
Processes a single paragraph. The following attributes are allowed:
Definition at line 1202 of file Textile.php. |
|
Takes a Textile formatted span and returns the markup for it.
Definition at line 2102 of file Textile.php. |
|
Takes a Wiki-ish string of data and transforms it into a full table.
Definition at line 2317 of file Textile.php. |
|
Constructs an HTML tag. Accepted arguments:
Definition at line 1749 of file Textile.php. |
|
Takes the given
Reimplemented in MTLikeTextile. Definition at line 2081 of file Textile.php. |
|
Used to get Textile attributes. Attribute names are the same as the get/set method names documented here.
Definition at line 251 of file Textile.php. References get(). Referenced by get(). |
|
Gets or sets the "smart quoting" control flag. Returns the current setting.
Definition at line 577 of file Textile.php. References handle_quotes(). Referenced by handle_quotes(). |
|
Gets or sets the relative heading offset, which allows you to change the heading level used within the text processed. For example, if the heading offset is '2' and the text contains an 'h1' block, an <h3> block will be output.
Definition at line 290 of file Textile.php. References head_offset(). Referenced by head_offset(), and Textile(). |
|
Returns the size for the image identified in
Definition at line 2729 of file Textile.php. |
|
Encodes the email address in
Definition at line 2773 of file Textile.php. |
|
Gets or sets the 'preserve spaces' control flag. If enabled, this will replace any double spaces within the paragraph data with the &#8195; HTML entity (wide space). The default is 0. Spaces will pass through to the browser unchanged and render as a single space. Note that this setting has no effect on spaces within <pre>, <code> blocks or <script> sections.
Definition at line 518 of file Textile.php. References preserve_spaces(). Referenced by preserve_spaces(), and Textile(). |
|
Transforms the provided text using Textile markup rules.
Definition at line 746 of file Textile.php. |
|
Processes string, formatting plain quotes into curly quotes.
Reimplemented in MTLikeTextile. Definition at line 2790 of file Textile.php. |
|
Used to set Textile attributes. Attribute names are the same as the get/set method names documented here.
Definition at line 221 of file Textile.php. References charset(), css(), flavor(), and set(). Referenced by set(). |
|
Gets or sets the 'trim spaces' control flag. If enabled, this will clear any lines that have only spaces on them (the newline itself will remain).
Definition at line 478 of file Textile.php. References trim_spaces(). Referenced by Textile(), and trim_spaces(). |
|
Returns the version of this release of Textile.php. *JHR*
Definition at line 3221 of file Textile.php. |
|
The Definition at line 91 of file Textile.php. |
|
The Definition at line 145 of file Textile.php. |
|
The Definition at line 127 of file Textile.php. |
|
The Definition at line 109 of file Textile.php. |
|
The Definition at line 118 of file Textile.php. |
|
The Definition at line 136 of file Textile.php. |
|
The Definition at line 82 of file Textile.php. |
|
Definition at line 2636 of file Textile.php. |
|
The Definition at line 100 of file Textile.php. |
|
The Definition at line 152 of file Textile.php. |
|
The Definition at line 37 of file Textile.php. Referenced by Textile(). |
|
The Definition at line 55 of file Textile.php. |
|
The Definition at line 165 of file Textile.php. |
|
The Definition at line 73 of file Textile.php. |
|
The Definition at line 173 of file Textile.php. |
|
The Definition at line 46 of file Textile.php. |
|
The Definition at line 64 of file Textile.php. |