[ Index ] |
|
Code source de Plume CMS 1.2.2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 334 lignes (11 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
html2text:: (7 méthodes):
html2text()
set_html()
get_text()
print_text()
p()
_convert()
_build_link_list()
html2text( $source = '', $from_file = false ) X-Ref |
Constructor. If the HTML source string (or file) is supplied, the class will instantiate with that source propagated, all that has to be done it to call get_text(). param: string $source HTML content param: boolean $from_file Indicates $source is a file to pull content from return: void |
set_html( $source, $from_file = false ) X-Ref |
Loads source HTML into memory, either from $source string or a file. param: string $source HTML content param: boolean $from_file Indicates $source is a file to pull content from return: void |
get_text() X-Ref |
Returns the text, converted from HTML. return: string |
print_text() X-Ref |
Prints the text, converted from HTML. return: void |
p() X-Ref |
Alias to print_text(), operates identically. return: void |
_convert() X-Ref |
Workhorse function that does actual conversion. First performs custom tag replacement specified by $search and $replace arrays. Then strips any remaining HTML tags, reduces whitespace and newlines to a readable format, and word wraps the text to $width characters. return: void |
_build_link_list($link_count, $link, $display) X-Ref |
Helper function called by preg_replace() on link replacement. Maintains an internal list of links to be displayed at the end of the text, with numeric indices to the original point in the text they appeared. param: integer $link_count Counter tracking current link number param: string $link URL of the link param: string $display Part of the text to associate number with return: string |
Généré le : Mon Nov 26 11:57:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |