在路由的注释中@param是什么意思?
我在symfony网站上找不到任何关于这个关键词的文档,我对它的用途和作用非常困惑。
我之所以这么问,是因为我正试图弄清楚如何访问.yml文件中的参数,以便在路由中使用,但我仍然希望使用注释,而不是yml路由方法。
显示一个代码示例可能不是最好的,但这里是@param显示的地方
/**
* League action
*
* @Route("/association/{assoc}/{league}", name="league", requirements={"league" = "'d+"}, defaults={"game" = null})
* @Route("/association/{assoc}/{league}/{game}")
* @Template()
*
* @param $assoc
* @param $league
* @param $game
* @return array
*/
我从这里开始(带有可选参数的注释中的Symfony2路线)
感谢您的帮助!
@param
和@return
是phpDocumentor注释,实际上并不影响路由。