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
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commitf0d4cc6

Browse files
author
Corentin Larose
committed
Added doc
1 parentaa30d01 commitf0d4cc6

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

‎README.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ The `config/module.config.php` file contains a self-explanative example of confi
5656

5757
####Key:`controllers`
5858

59-
The`controllers` key is utilized for mapping a combination of a controller and a HTTP method (see below) to a cache header configuration.
59+
The`controllers` key is utilized for mapping (case sensitive) either
60+
- a route name
61+
- or a concatenated`controller::action`
62+
- or a controller
63+
- or a regexp
64+
- or a wildcard
65+
and a HTTP method (see below) to a cache header configuration.
6066

6167
Example:
6268

@@ -80,7 +86,11 @@ Example:
8086

8187
#####Key:`<controller>`
8288

83-
Either a controller name (as returned by`Zend\Mvc\MvcEvent::getRouteMatch()->getParam('controller')`, case-sensitive) or a wildcard.
89+
Either
90+
- a concatenation of`$controller::$action`
91+
- or a controller name (as returned by`Zend\Mvc\MvcEvent::getRouteMatch()->getParam('controller')`, case-sensitive)
92+
- or a regexp (see`<regex_delimiter>` key)
93+
- or a wildcard
8494

8595
A wildcard stands for all the non-specified controllers.
8696

‎config/module.config.php‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// /*
5858
// * Regular configuration.
5959
// */
60-
// 'home' => [ //controller name
60+
// 'home::index' => [ //route name
6161
// 'get' => [ // Http method (wildcard '*' supported as whatever method)
6262
// /*
6363
// * General HTTP caching theory: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
@@ -92,6 +92,15 @@
9292
// ],
9393
// ],
9494
// ],
95+
// 'index::index' => [ // controller / action names
96+
// 'get' => [...],
97+
// ],
98+
// 'index' => [ // controller name
99+
// 'get' => [...],
100+
// ],
101+
// '~.*::index~' => [ // regex
102+
// 'get' => [...],
103+
// ],
95104
// ],
96105
//
97106
// /*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp