Skip to content

Commit f356205

Browse files
committed
Merge 5.x, resolve conflicts keeping both headings and return types
2 parents 05b737a + 298c07b commit f356205

16 files changed

Lines changed: 113 additions & 58 deletions

File tree

docs/en/appendices/glossary.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
<div class="glossary">
44

5-
CDN
5+
CDN
66
Content Delivery Network. A 3rd party vendor you can pay to help
77
distribute your content to data centers around the world. This helps
88
put your static assets closer to geographically distributed users.
99

10-
columns
10+
columns
1111
Used in the ORM when referring to the table columns in an database
1212
table.
1313

14-
CSRF
14+
CSRF
1515
Cross Site Request Forgery. Prevents replay attacks, double
1616
submissions and forged requests from other domains.
1717

18-
DI Container
18+
DI Container
1919
In `Application::services()` you can configure application services
2020
and their dependencies. Application services are automatically injected
2121
into Controller actions, and Command Constructors. See
2222
[Dependency Injection](../development/dependency-injection).
2323

24-
DSN
24+
DSN
2525
Data Source Name. A connection string format that is formed like a URI.
2626
CakePHP supports DSNs for Cache, Database, Log and Email connections.
2727

28-
dot notation
28+
dot notation
2929
Dot notation defines an array path, by separating nested levels with `.`
3030
For example:
3131

@@ -43,17 +43,17 @@ Would point to the following value:
4343
]
4444
```
4545

46-
DRY
46+
DRY
4747
Don't repeat yourself. Is a principle of software development aimed at
4848
reducing repetition of information of all kinds. In CakePHP DRY is used
4949
to allow you to code things once and re-use them across your
5050
application.
5151

52-
fields
52+
fields
5353
A generic term used to describe both entity properties, or database
5454
columns. Often used in conjunction with the FormHelper.
5555

56-
HTML attributes
56+
HTML attributes
5757
An array of key =\> values that are composed into HTML attributes. For example:
5858

5959
``` text
@@ -75,15 +75,15 @@ can be used:
7575
checked="checked"
7676
```
7777

78-
PaaS
78+
PaaS
7979
Platform as a Service. Platform as a Service providers will provide
8080
cloud based hosting, database and caching resources. Some popular
8181
providers include Heroku, EngineYard and PagodaBox
8282

83-
properties
83+
properties
8484
Used when referencing columns mapped onto an ORM entity.
8585

86-
plugin syntax
86+
plugin syntax
8787
Plugin syntax refers to the dot separated class name indicating classes
8888
are part of a plugin:
8989

@@ -95,13 +95,13 @@ are part of a plugin:
9595
'AcmeCorp/Tools.Toolbar'
9696
```
9797

98-
routes.php
99-
A file in `config` directory that contains routing configuration.
98+
routes.php
99+
A file in the `config/` directory that contains routing configuration.
100100
This file is included before each request is processed.
101101
It should connect all the routes your application needs so
102102
requests can be routed to the correct controller + action.
103103

104-
routing array
104+
routing array
105105
An array of attributes that are passed to `Router::url()`.
106106
They typically look like:
107107

docs/en/console-commands/i18n.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ This will generate the required POT files used in the plugins.
3939

4040
Sometimes, you might need to extract strings from more than one directory of
4141
your application. For instance, if you are defining some strings in the
42-
`config` directory of your application, you probably want to extract strings
43-
from this directory as well as from the `src` directory. You can do it by
42+
`config/` directory of your application, you probably want to extract strings
43+
from this directory as well as from the `src/` directory. You can do it by
4444
using the `--paths` option. It takes a comma-separated list of absolute paths
4545
to extract:
4646

docs/en/controllers.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ $recentArticles = $this->fetchTable('Articles')->find('all',
476476
->all();
477477
```
478478

479+
### fetchModel()
480+
479481
`method` Cake\\Controller\\Controller::**fetchModel**(string|null $modelClass = null, string|null $modelType = null)
480482

481483
The `fetchModel()` method is useful to load non ORM models or ORM tables that
@@ -557,10 +559,16 @@ logic around the request life-cycle:
557559
By default the following callback methods are connected to related events if the
558560
methods are implemented by your controllers
559561

562+
#### beforeFilter()
563+
560564
`method` Cake\\Controller\\Controller::**beforeFilter**(EventInterface $event): void
561565

566+
#### beforeRender()
567+
562568
`method` Cake\\Controller\\Controller::**beforeRender**(EventInterface $event): void
563569

570+
#### afterFilter()
571+
564572
`method` Cake\\Controller\\Controller::**afterFilter**(EventInterface $event): void
565573

566574
In addition to controller life-cycle callbacks, [Components](controllers/components)

docs/en/core-libraries/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The method returns paths set using `App.paths` app config:
4444
App::path('templates');
4545
```
4646

47-
The same way you can retrieve paths for `locales`, `plugins`.
47+
The same way you can retrieve paths for `locales` and `plugins`.
4848

4949
## Finding Paths to Namespaces
5050

docs/en/core-libraries/email.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Emails are often much more than just a simple text message. In order
152152
to facilitate that, CakePHP provides a way to send emails using CakePHP's
153153
[view layer](../views).
154154

155-
The templates for emails reside in a special folder `templates/email` of your
155+
The templates for emails reside in a special folder `templates/email/` of your
156156
application. Mailer views can also use layouts and elements just like normal views:
157157

158158
``` php

docs/en/deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ sure it doesn't have any obvious leaks:
7171
of mass-assignment issues.
7272
- Ensure your models have the correct [Validation](core-libraries/validation) rules
7373
enabled.
74-
- Check that only your `webroot` directory is publicly visible, and that your
74+
- Check that only your `webroot/` directory is publicly visible, and that your
7575
secrets (such as your app salt, and any security keys) are private and unique
7676
as well.
7777

@@ -106,8 +106,8 @@ the `plugin` command:
106106

107107
bin/cake plugin assets symlink
108108

109-
The above command will symlink the `webroot` directory of all loaded plugins
110-
to appropriate path in the app's `webroot` directory.
109+
The above command will symlink the `webroot/` directory of all loaded plugins
110+
to appropriate path in the app's `webroot/` directory.
111111

112112
If your filesystem doesn't allow creating symlinks the directories will be
113113
copied instead of being symlinked. You can also explicitly copy the directories

docs/en/development/configuration.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ will be used if no environment variable exists for the given key.
9797
Below is a description of the variables and how they affect your CakePHP
9898
application.
9999

100-
debug
100+
debug
101101
Changes CakePHP debugging output. `false` = Production mode. No error
102102
messages, errors, or warnings shown. `true` = Errors and warnings shown.
103103

104-
App.namespace
104+
App.namespace
105105
The namespace to find app classes under.
106106

107107
> [!NOTE]
@@ -112,29 +112,29 @@ The namespace to find app classes under.
112112
113113
<div id="core-configuration-baseurl">
114114

115-
App.baseUrl
115+
App.baseUrl
116116
Un-comment this definition if you **don’t** plan to use Apache’s
117117
mod_rewrite with CakePHP. Don’t forget to remove your .htaccess
118118
files too.
119119

120-
App.base
120+
App.base
121121
The base directory the app resides in. If `false` this
122122
will be auto detected. If not `false`, ensure your string starts
123123
with a <span class="title-ref">/</span> and does NOT end with a <span class="title-ref">/</span>. For example, <span class="title-ref">/basedir</span> is a valid
124124
App.base.
125125

126-
App.encoding
126+
App.encoding
127127
Define what encoding your application uses. This encoding
128128
is used to generate the charset in the layout, and encode entities.
129129
It should match the encoding values specified for your database.
130130

131-
App.webroot
131+
App.webroot
132132
The webroot directory.
133133

134-
App.wwwRoot
134+
App.wwwRoot
135135
The file path to webroot.
136136

137-
App.fullBaseUrl
137+
App.fullBaseUrl
138138
The fully qualified domain name (including protocol) to your application's
139139
root. This is used when generating absolute URLs. By default this value
140140
is generated using the `$_SERVER` environment. However, you should define it
@@ -144,34 +144,34 @@ In a CLI context (from command) the <span class="title-ref">fullBaseUrl</span> c
144144
as there is no webserver involved. You do need to specify it yourself if
145145
you do need to generate URLs from a shell (for example, when sending emails).
146146

147-
App.imageBaseUrl
147+
App.imageBaseUrl
148148
Web path to the public images directory under webroot. If you are using
149149
a `CDN` you should set this value to the CDN's location.
150150

151-
App.cssBaseUrl
151+
App.cssBaseUrl
152152
Web path to the public css directory under webroot. If you are using
153153
a `CDN` you should set this value to the CDN's location.
154154

155-
App.jsBaseUrl
155+
App.jsBaseUrl
156156
Web path to the public js directory under webroot. If you are using
157157
a `CDN` you should set this value to the CDN's location.
158158

159-
App.paths
159+
App.paths
160160
Configure paths for non class based resources. Supports the
161161
`plugins`, `templates`, `locales` subkeys, which allow the definition
162162
of paths for plugins, view templates and locale files respectively.
163163

164-
App.uploadedFilesAsObjects
164+
App.uploadedFilesAsObjects
165165
Defines whether uploaded files are being represented as objects (`true`),
166166
or arrays (`false`). This option is being treated as enabled by default.
167167
See the [File Uploads section](../controllers/request-response#request-file-uploads) in the Request &
168168
Response Objects chapter for more information.
169169

170-
Security.salt
170+
Security.salt
171171
A random string used in hashing. This value is also used as the
172172
HMAC salt when doing symmetric encryption.
173173

174-
Asset.timestamp
174+
Asset.timestamp
175175
Appends a timestamp which is last modified time of the particular
176176
file at the end of asset files URLs (CSS, JavaScript, Image) when
177177
using proper helpers. Valid values:
@@ -180,7 +180,7 @@ using proper helpers. Valid values:
180180
- (bool) `true` - Appends the timestamp when debug is `true`
181181
- (string) 'force' - Always appends the timestamp.
182182

183-
Asset.cacheTime
183+
Asset.cacheTime
184184
Sets the asset cache time. This determines the http header `Cache-Control`'s
185185
`max-age`, and the http header's `Expire`'s time for assets.
186186
This can take anything that you version of PHP's [strtotime function](https://php.net/manual/en/function.strtotime.php) can take.

docs/en/development/sessions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The above overrides the timeout and cookie name for the 'php' session
127127
configuration. The built-in configurations are:
128128

129129
- `php` - Saves sessions with the standard settings in your php.ini file.
130-
- `cake` - Saves sessions as files inside `tmp/sessions`. This is a
130+
- `cake` - Saves sessions as files inside `tmp/sessions/`. This is a
131131
good option when on hosts that don't allow you to write outside your own home
132132
dir.
133133
- `database` - Use the built-in database sessions. See below for more

docs/en/intro/cakephp-folder-structure.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,53 @@
33
After you've downloaded the CakePHP application skeleton, there are a few top
44
level folders you should see:
55

6-
- `bin` holds the Cake console executables so you can execute e.g. `bin/cake bake all`.
6+
- `bin/` holds the Cake console executables so you can execute e.g. `bin/cake bake all`.
77

8-
- `config` holds the [Configuration](../development/configuration) files.
8+
- `config/` holds the [Configuration](../development/configuration) files.
99
Database connection details, bootstrapping, core configuration files
1010
and more should be stored here.
1111

12-
- `plugins` is where the [Plugins](../plugins) your application uses are stored.
12+
- `plugins/` is where the [Plugins](../plugins) your application uses are stored.
1313

14-
- `logs` contains your log files, can be adjusted via [Log Configuration](../core-libraries/logging.md#logging-configuration).
14+
- `logs/` contains your log files, can be adjusted via [Log Configuration](../core-libraries/logging.md#logging-configuration).
1515

16-
- `src` will be where your applications source files like Controllers, Models, Commands etc. will be placed.
16+
- `src/` will be where your application's source files like Controllers, Models, Commands etc. will be placed.
1717

18-
- `templates` has presentational files placed here:
18+
- `templates/` has presentational files placed here:
1919
elements, error pages, layouts, and view template files.
2020

21-
- `resources` is primarily used for the `locales` sub folder storing language files for static internationalization.
21+
- `resources/` is primarily used for the `locales/` subfolder storing language files for static internationalization.
2222

23-
- `tests` will be where you put the test cases for your application.
23+
- `tests/` will be where you put the test cases for your application.
2424

25-
- `tmp` is where CakePHP stores temporary data. The actual data it
25+
- `tmp/` is where CakePHP stores temporary data. The actual data it
2626
stores depends on how you have CakePHP configured, but this folder
2727
is usually used to store translation messages, model descriptions and sometimes
2828
session information.
2929

30-
- `vendor` is where CakePHP and other application dependencies will
30+
- `vendor/` is where CakePHP and other application dependencies will
3131
be installed by [Composer](https://getcomposer.org). **Editing these files is not
3232
advised, as Composer will overwrite your changes next time you update.**
3333

34-
- `webroot` is the public document root of your application. It
34+
- `webroot/` is the public document root of your application. It
3535
contains all the files you want to be publicly reachable.
3636

37-
Make sure that the `tmp` and `logs` folders exist and are writable,
37+
Make sure that the `tmp/` and `logs/` folders exist and are writable,
3838
otherwise the performance of your application will be severely
39-
impacted. In debug mode, CakePHP will warn you, if these directories are not
39+
impacted. In debug mode, CakePHP will warn you if these directories are not
4040
writable.
4141

4242
## The src Folder
4343

44-
CakePHP's `src` folder is where you will do most of your application
45-
development. Let's look a little closer at the folders inside
46-
`src`.
44+
CakePHP's `src/` folder is where you will do most of your application
45+
development. Let's look a little closer at the folders inside.
4746

4847
### Command
4948
Contains your application's console commands. See
5049
[Command Objects](../console-commands/commands) to learn more.
5150

5251
> [!NOTE]
53-
> The folder `Command` is not present by default.
52+
> The folder `Command/` is not present by default.
5453
> It will be auto generated when you create your first command using bake.
5554
5655
### Console

docs/en/orm/deleting-data.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
`class` Cake\\ORM\\**Table**
44

5+
## Deleting a Single Entity
6+
57
`method` Cake\\ORM\\Table::**delete**(EntityInterface $entity, array $options = []): bool
68

79
Once you've loaded an entity you can delete it by calling the originating
@@ -80,6 +82,8 @@ $this->Articles->deleteManyOrFail($entities);
8082
The `$options` for these methods are the same as `delete()`. Deleting
8183
records with these method **will** trigger events.
8284

85+
### deleteAll()
86+
8387
`method` Cake\\ORM\\Table::**deleteAll**($conditions): int
8488

8589
There may be times when deleting rows one by one is not efficient or useful.

0 commit comments

Comments
 (0)