如何制作<code> work in ApiGen

时间:2015-08-06 13:52:28

标签: phpdoc apigen

Tying to generate auto doc using ApiGen. Have add followed comment for doc generation. I was hope that block in "code" will make same appearance as in short's description, but it does not work. I'm not sure how to make the same. Are there some method?enter image description here

/**
 * Short desc
 * 
 * @param array $tabs
 * 
 * For example
 * <code>
 * $admin_tabs = array(
 *           'AdminDeliveryManager' => array('name' => 'Delivery manager', 'id_parent' => 0),
 *           'AdminRole' => array('name' => 'Admin role', 'id_parent' => -1),
 *           'AdminEmployeeRole' => array('name' => 'Admin role', 'id_parent' => -1)
 *       );
 * </code>
 * 
 * @return boolean true if all tabs created / false if have some error
 */

1 个答案:

答案 0 :(得分:1)

ApiGen首先需要简单的描述,然后是所有的标记行。

如何使用该函数的示例应该放在@example标记中,如下所示:

/**
 * Short desc
 *
 * @param  array   $tabs
 * @return boolean       true if all tabs created / false if have some error
 * @example
 * <code>
 * $admin_tabs = array(
 *           'AdminDeliveryManager' => array('name' => 'Delivery manager', 'id_parent' => 0),
 *           'AdminRole' => array('name' => 'Admin role', 'id_parent' => -1),
 *           'AdminEmployeeRole' => array('name' => 'Admin role', 'id_parent' => -1)
 *       );
 * createTabs($admin_tabs);
 * </code>
 */

How it renders for me