dongyinshua9996 2018-02-08 10:13
浏览 21
已采纳

找出Symfony路线的定义位置?

I am working with a project that uses the Sonata Page Bundle.

After grepping all of my php files and settings files for the name of a route, I eventually found that it was being stored in the database, in a table called page__page.

My question is this: Is there an easy way to find out where a matched route is defined? Using the "profiler token" link on Symfony's debugging toolbar, I am at least able to get the name of the route, which is somewhat helpful. Unfortunately, that's where the default functionality appears to end.

  • 写回答

1条回答 默认 最新

  • duanmei1922 2018-02-08 10:41
    关注

    You have a lot of ways to create and register routes.

    The more complex are the CMF and the custom loading.

    Symfony don't track which route is defined where and when. It only tracks the compiler_class used. You can display it by using

    bin/console debug:router page__page
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100