0

我想知道如何使用这个。我正在尝试使用这个: https ://www.phpdoc.org/docs/latest/references/phpdoc/tags/example.html

我这样使用它:

/**
  * Format date/timestamp to localized format
  *
  * @example site/modules/KeyAgencyGeneral/Helper/Page.php 247 16 my description
  */

起始行确实有效,但行数无效,它显示为描述的一部分。

在文档中它说像这样使用它:

@example [location] [<start-line> [<number-of-lines>] ] [<description>]

当我尝试使用括号时,它根本不起作用,所以我不知道如何限制显示的行数。

(附带问题:是否可以在示例中启用突出显示,或显示行号?)

4

1 回答 1

0

在:

>php bin\phpDocumentor.phar -V
phpDocumentor version v2.8.5

它工作得很好:)

例如:

/**
 * configure the system
 * @example BillingCommand.php  98 3 some Date methods
 */
protected function configure()
{
...........

你从 98 得到了三行:

在此处输入图像描述

(phpDocumentor 在源文件的文件夹中找到示例)

要在示例中启用突出显示或显示行号,您必须编辑用于呈现文档的模板。复制和修改一个......

于 2017-03-24T13:00:38.493 回答