本文整理汇总了PHP中Linker::autocommentLocal方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::autocommentLocal方法的具体用法?PHP Linker::autocommentLocal怎么用?PHP Linker::autocommentLocal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linker
的用法示例。
在下文中一共展示了Linker::autocommentLocal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatAutocomments
/**
* The pattern for autogen comments is / * foo * /, which makes for
* some nasty regex.
* We look for all comments, match any text before and after the comment,
* add a separator where needed and format the comment itself with CSS
* Called by Linker::formatComment.
*
* @param $comment String: comment text
* @param $title An optional title object used to links to sections
* @param $local Boolean: whether section links should refer to local page
* @return String: formatted comment
*/
private static function formatAutocomments($comment, $title = null, $local = false)
{
// Bah!
self::$autocommentTitle = $title;
self::$autocommentLocal = $local;
$comment = preg_replace_callback('!(.*)/\\*\\s*(.*?)\\s*\\*/(.*)!', array('Linker', 'formatAutocommentsCallback'), $comment);
self::$autocommentTitle = null;
self::$autocommentLocal = null;
return $comment;
}