[ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
[Code source] [Imprimer] [Statistiques]
Text-to-HTML parser. Text-to-html parser, similar to {@link http://textism.com/tools/textile/ Textile} or {@link http://www.whytheluckystiff.net/ruby/redcloth/ RedCloth}.
Copyright: | Copyright 2005-2007, Cake Software Foundation, Inc. |
License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
Version: | $Revision: 4409 $ |
Poids: | 278 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Flay:: (8 méthodes):
__construct()
toHtml()
extractWords()
markedSnippets()
colorMark()
toClean()
toParsedAndClean()
fragment()
__construct($text = null) X-Ref |
Constructor. param: string $text |
toHtml($text = null, $bare = false, $allowHtml = false) X-Ref |
Returns given text translated to HTML using the Flay syntax. param: string $text String to format param: boolean $bare Set this to only do <p> transforms and > to >, no typography additions. param: boolean $allowHtml Set this to trim whitespace and disable all HTML return: string Formatted text |
extractWords($string) X-Ref |
Return the words of the string as an array. param: string $string return: array Array of words |
markedSnippets($words, $string, $max_snippets = 5) X-Ref |
Return given string with words in array colorMarked, up to a number of times (defaults to 5). param: array $words Words to look for and markup param: string $string String to look in param: integer $max_snippets Max number of snippets to extract return: string |
colorMark($words, $string) X-Ref |
Returns string with EM elements with color classes added. param: array $words Array of words to be colorized param: string $string Text in which the words might be found return: string |
toClean($text) X-Ref |
Returns given text with tags stripped out. param: string $text return: string |
toParsedAndClean($text) X-Ref |
Return parsed text with tags stripped out. param: string $text return: string |
fragment($text, $length, $ellipsis = '...') X-Ref |
Return a fragment of a text, up to $length characters long, with an ellipsis after it. param: string $text Text to be truncated. param: integer $length Max length of text. param: string $ellipsis Sign to print after truncated text. return: string |
Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |