<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 路由名 Application routes can be assigned a name. This is useful if you want to programmatically generate a URL to a specific route with the RouteParser’s`urlFor()`method. Each routing method described above returns a`Slim\Route`object, and this object exposes a`setName()`method. > 可以為應用程序路由分配一個名稱。 > > 如果您希望使用路由分析器的`urlFor()`方法以編程方式生成指向特定路由的URL,這是非常有用的。 > > 上面描述的每個路由方法都返回一個`Slim\Route`對象,這個對象公開一個`etName()`方法。 ~~~php $app->get('/hello/{name}', function ($request, $response, $args) { echo "Hello, " . $args['name']; })->setName('hello'); ~~~ You can generate a URL for this named route with the application RouteParser’s`urlFor()`method. 您可以使用應用程序路由分析器的`urlFor()`方法為這個命名路由生成一個URL。 ~~~php $routeParser = $app->getRouteCollector()->getRouteParser(); echo $routeParser->urlFor('hello', ['name' => 'Josh'], ['example' => 'name']); // Outputs "/hello/Josh?example=name" ~~~ The RouteParser’s`urlFor()`method accepts three arguments: * `$routeName`The route name. A route’s name can be set via`$route->setName('name')`. Route mapping methods return an instance of`Route`so you can set the name directly after mapping the route. e.g.:`$app->get('/', function () {...})->setName('name')` * `$data`Associative array of route pattern placeholders and replacement values. * `$queryParams`Associative array of query parameters to be appended to the generated url. > RouteParser的`urlFor()`方法接受三個參數: > `$routeName`路由名稱。路由的名稱可以通過`$route->setName('name')`來設置。路由映射方法返回一個“Route”實例,這樣您就可以在映射路由后直接設置名稱。 > > 例如:`$app->get('/', function(){…})->setName('name') ` > > ` $data`關聯數組的路由模式占位符和替換值。 > > `$queryParams`關聯數組的查詢參數要附加到生成的url。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看