Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对我为包含模板而编写的大量代码感到沮丧,并且想知道是否有一种方法可以将来自控制器的模板或模板包含在同一个包中而无需编写包名称?
所以而不是这个:
$this->render('AcmeBlogBundle:Controller:template.html.php');
我可以这样写:
$this->render('::template.html.php')
这是重复代码,这是一种耻辱。