duandunzhuo3234 2014-04-08 19:09
浏览 34

如何在Zend Framework 2中组织大量的路由

We have a lot of routes for our application. We are using child_routes to try to keep them organized, but the config files still get very long and difficult to read through.

Does anyone know of a better way to organize the routes?

We're using Zend Studio, does anyone know of tools in it that can help?

  • 写回答

1条回答 默认 最新

  • dongli564510 2014-04-08 19:20
    关注

    TL\DR: not using ZF2

    Well, that's config files and the current routing and there's nothing really to change that. When it comes to ZF3 however, the routing config should go down a little. This becomes even more true when you'll be using the short array syntax [].

    You can take a loot at the draft of the ZF3 Router here (remember, this can still change!)

    Using indexed parameters for routes, we'll be able to keep the config to a minimum of what we need. And considering you'll be using php 5.5 it can be simplified even further using UserController::class instead of Application\Controller\UserController

    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本