本文整理汇总了PHP中Textile::textileRestricted方法的典型用法代码示例。如果您正苦于以下问题:PHP Textile::textileRestricted方法的具体用法?PHP Textile::textileRestricted怎么用?PHP Textile::textileRestricted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Textile
的用法示例。
在下文中一共展示了Textile::textileRestricted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filter
/**
* Filter.
*
* @param string $thing
* @param array $options
*/
public function filter($thing, $options)
{
parent::filter($thing, $options);
if ($this->options['restricted']) {
return $this->textile->textileRestricted($thing, $this->options['lite'], $this->options['noimage'], $this->options['rel']);
} else {
return $this->textile->textileThis($thing, $this->options['lite'], '', $this->options['noimage'], '', $this->options['rel']);
}
}
示例2: textileRestricted
/**
* Parses content in a restricted mode.
*
* @param string|null $text The input document in textile format
* @param bool|null $lite Optional flag to switch the parser into lite mode
* @param bool|null $noimage Optional flag controlling the conversion of images into HTML img tags
* @param string|null $rel Relationship to apply to all generated links
* @return string The text from the input document
*/
public function textileRestricted($text, $lite = null, $noimage = null, $rel = null)
{
if ($lite === null) {
$lite = get_pref('comments_use_fat_textile', 1);
}
if ($noimage === null) {
$noimage = get_pref('comments_disallow_images', 1);
}
if ($rel === null && get_pref('comment_nofollow', 1)) {
$rel = 'nofollow';
}
return parent::textileRestricted($text, $lite, $noimage, $rel);
}
示例3: parse_string
public function parse_string($template, $data = array(), $return = FALSE, $options = array())
{
if (!is_array($options)) {
$options = array();
}
$options = array_merge($this->config, $options);
$ci = $this->ci;
$is_mx = false;
if (!$return) {
list($ci, $is_mx) = $this->detect_mx();
}
$parser = new Textile($options['doctype']);
if ($options['restricted_mode']) {
$template = $parser->textileRestricted($template);
} else {
$template = $parser->textileThis($template);
}
return $this->output($template, $return, $ci, $is_mx);
}