本文整理匯總了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;
}