【发布时间】:2013-08-19 22:31:18
【问题描述】:
我正在努力弄清楚如何构建我的代码,以便 phpDocumentor 能够利用代码块。
/**
* GET -- Book, either filtered by id or a full list.
*
* @param SlimApplication $app The application object instance.
* @param integer $id The id of the book
*/
$callbackFunction = function($id) use ($app)
{
//some functionality here.
};
$app->get('/books(/:id)', $callbackFunction );
我可能应该继续使用内联 use 语句,以便可以使用 $app。
大家有什么建议吗?
【问题讨论】: