Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Small clarification to routing.rst#2854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsbook/routing.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1201,7 +1201,7 @@ By default, the router will generate relative URLs (e.g. ``/blog``). To generate
an absolute URL, simply pass ``true`` to the third argument of the ``generate()``
method::

$router->generate('blog_show', array('slug' => 'my-blog-post'), true);
$this-get('router')->generate('blog_show', array('slug' => 'my-blog-post'), true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

$this->get('router')

// http://www.example.com/blog/my-blog-post

.. note::
Expand All@@ -1212,7 +1212,7 @@ method::
scripts run from the command line, you'll need to manually set the desired
host on the ``RequestContext`` object::

$router->getContext()->setHost('www.example.com');
$this-get('router')->getContext()->setHost('www.example.com');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

same here


.. index::
single: Routing; Generating URLs in a template
Expand All@@ -1223,7 +1223,7 @@ Generating URLs with Query Strings
The ``generate`` method takes an array of wildcard values to generate the URI.
But if you pass extra ones, they will be added to the URI as a query string::

$router->generate('blog', array('page' => 2, 'category' => 'Symfony'));
$this-get('router')->generate('blog', array('page' => 2, 'category' => 'Symfony'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

and here

// /blog/2?category=Symfony

Generating URLs from a template
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp