本文整理匯總了PHP中PHPWS_Text::useBreaker方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHPWS_Text::useBreaker方法的具體用法?PHP PHPWS_Text::useBreaker怎麽用?PHP PHPWS_Text::useBreaker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PHPWS_Text
的用法示例。
在下文中一共展示了PHPWS_Text::useBreaker方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parseOutput
/**
* Prepares text for display
*
* Should be used after retrieving data from the database
*
* @author Matthew McNaney <mcnaney at gmail dot com>
* @param string text Text to parse
* @param boolean decode Whether entity_decoding should take place.
* @param boolean use_filters If true, any filters requested in the text_settings file will be
* run against the output text. (deprecated)
* @return string text Stripped text
*/
public static function parseOutput($text, $decode = ENCODE_PARSED_TEXT, $use_filters = false, $use_breaker = USE_BREAKER, $fix_anchors = FIX_ANCHORS)
{
$t = new PHPWS_Text();
$t->setText($text, $decode);
$t->useBreaker($use_breaker);
$t->useAnchor($fix_anchors);
$text = $t->getPrint();
$text = filter_var($text, FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH);
return $text;
}