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

Updated the event dispatcher articles for Symfony 4#8670

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

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletionsevent_dispatcher.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -258,6 +258,6 @@ Learn more

.. toctree::
:maxdepth: 1
:glob:

event_dispatcher/*
event_dispatcher/before_after_filters
event_dispatcher/method_behavior
11 changes: 5 additions & 6 deletionsevent_dispatcher/before_after_filters.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,22 +33,21 @@ token.
Before Filters with the ``kernel.controller`` Event
---------------------------------------------------

First, store some basic token configuration using ``config.yml`` and the
parameters key:
First, define some token configuration as parameters:

.. configuration-block::

.. code-block:: yaml

#app/config/config.yml
# config/services.yaml
parameters:
tokens:
client1: pass1
client2: pass2

.. code-block:: xml

<!--app/config/config.xml -->
<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All@@ -65,7 +64,7 @@ parameters key:

.. code-block:: php

//app/config/config.php
// config/services.php
$container->setParameter('tokens', array(
'client1' => 'pass1',
'client2' => 'pass2',
Expand DownExpand Up@@ -98,7 +97,7 @@ A controller that implements this interface simply looks like this::
class FooController extends Controller implements TokenAuthenticatedController
{
// An action that needs authentication
public functionbarAction()
public functionbar()
{
// ...
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp