symfony使用什么PHP文档表示法?

时间:2012-08-02 20:30:14

标签: documentation symfony-1.4 phpdoc

我使用Notation这个词,因为fabien potencier有自己的生成器,但我找不到它用于评论的符号(或语法,如果你愿意)。

http://fabien.potencier.org/article/63/sami-yet-another-php-api-documentation-generator

另外,我在哪里可以找到使用文档生成器的注释表示法? 看起来像PhpDocumentor,但我不能确定。

symfony是否使用此生成器?

1 个答案:

答案 0 :(得分:2)

Symfony 1.4使用phpDocumentor(几乎)确定。

我从未尝试过Sami,但我想它可以在Symfony 1.4上运行。

关于评论符号,我认为Sami,phpDoc等几乎相同..他们都使用 DocBlock like

/**
  * This is the short description for a DocBlock.
  *
  * This is the long description for a DocBlock. This text may contain
  * multiple lines and even some _markdown_.
  *
  * * Markdown style lists function too
  * * Just try this out once
  *
  * The section after the long description contains the tags; which provide
  * structured meta-data concerning the given element.
  *
  * @author  Mike van Riel <mike.vanriel@naenius.com>
  *
  * @since 1.0
  *
  * @param int    $example  This is an example function/method parameter description.
  * @param string $example2 This is a second example.
  */

我在Symfony 2.0中使用random class

/**
 * Renders a Controller and returns the Response content.
 *
 * Note that this method generates an esi:include tag only when both the standalone
 * option is set to true and the request has ESI capability (@see Symfony\Component\HttpKernel\HttpCache\ESI).
 *
 * Available options:
 *
 *  * attributes: An array of request attributes (only when the first argument is a controller)
 *  * query: An array of request query parameters (only when the first argument is a controller)
 *  * ignore_errors: true to return an empty string in case of an error
 *  * alt: an alternative controller to execute in case of an error (can be a controller, a URI, or an array with the controller, the attributes, and the query arguments)
 *  * standalone: whether to generate an esi:include tag or not when ESI is supported
 *  * comment: a comment to add when returning an esi:include tag
 *
 * @param string $controller A controller name to execute (a string like BlogBundle:Post:index), or a relative URI
 * @param array  $options    An array of options
 *
 * @return string The Response content
 */

来自symfony 1.4的an other one

/**
 * Initializes this sfRequest.
 *
 * Available options:
 *
 *  * formats:           The list of supported format and their associated mime-types
 *  * path_info_key:     The path info key (default to PATH_INFO)
 *  * path_info_array:   The path info array (default to SERVER)
 *  * relative_url_root: The relative URL root
 *  * http_port:         The port to use for HTTP requests
 *  * https_port:        The port to use for HTTPS requests
 *
 * @param  sfEventDispatcher $dispatcher  An sfEventDispatcher instance
 * @param  array             $parameters  An associative array of initialization parameters
 * @param  array             $attributes  An associative array of initialization attributes
 * @param  array             $options     An associative array of options
 *
 * @return bool true, if initialization completes successfully, otherwise false
 *
 * @throws <b>sfInitializationException</b> If an error occurs while initializing this sfRequest
 *
 * @see sfRequest
 */