Skip to content

Commit cdd564a

Browse files
committed
docs: add SetCookie::withPartitioned() to example
1 parent 2b7fb20 commit cdd564a

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

README.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FIG Cookies
2-
===========
1+
# FIG Cookies
32

43
Managing Cookies for PSR-7 Requests and Responses.
54

@@ -15,20 +14,16 @@ Managing Cookies for PSR-7 Requests and Responses.
1514
<br>
1615
[![Join the chat at https://gitter.im/dflydev/dflydev-fig-cookies](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dflydev/dflydev-fig-cookies?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1716

18-
19-
Installation
20-
------------
17+
## Installation
2118

2219
```bash
2320
$> composer require dflydev/fig-cookies
2421
```
2522

23+
## Concepts
2624

27-
Concepts
28-
--------
29-
30-
FIG Cookies tackles two problems, managing **Cookie** *Request* headers and
31-
managing **Set-Cookie** *Response* headers. It does this by way of introducing
25+
FIG Cookies tackles two problems, managing **Cookie** _Request_ headers and
26+
managing **Set-Cookie** _Response_ headers. It does this by way of introducing
3227
a `Cookies` class to manage collections of `Cookie` instances and a
3328
`SetCookies` class to manage collections of `SetCookie` instances.
3429

@@ -66,9 +61,7 @@ verbose very quickly. In order to get around that, FIG Cookies provides
6661
two facades in an attempt to help simplify things and make the whole process
6762
less verbose.
6863

69-
70-
Basic Usage
71-
-----------
64+
## Basic Usage
7265

7366
The easiest way to start working with FIG Cookies is by using the
7467
`FigRequestCookies` and `FigResponseCookies` classes. They are facades to the
@@ -81,7 +74,6 @@ process so be wary of using too many of these calls in the same section of
8174
code. In some cases it may be better to work with the primitive FIG Cookies
8275
classes directly rather than using the facades.
8376

84-
8577
### Request Cookies
8678

8779
Requests include cookie information in the **Cookie** request header. The
@@ -180,6 +172,7 @@ $setCookie = SetCookie::create('lu')
180172
->withSecure(true)
181173
->withHttpOnly(true)
182174
->withSameSite(SameSite::lax())
175+
->witHPartitioned()
183176
;
184177
```
185178

@@ -279,9 +272,7 @@ $setCookie = SetCookie::create('ba')
279272
FigResponseCookies::set($response, $setCookie->expire());
280273
```
281274

282-
283-
FAQ
284-
---
275+
## FAQ
285276

286277
### Do you call `setcookies`?
287278

@@ -290,15 +281,13 @@ No.
290281
Delivery of the rendered `SetCookie` instances is the responsibility of the
291282
PSR-7 client implementation.
292283

293-
294284
### Do you do anything with sessions?
295285

296286
No.
297287

298288
It would be possible to build session handling using cookies on top of FIG
299289
Cookies but it is out of scope for this package.
300290

301-
302291
### Do you read from `$_COOKIES`?
303292

304293
No.
@@ -310,18 +299,14 @@ implementations should be including `$_COOKIES` values in the headers
310299
so in that case FIG Cookies may be interacting with `$_COOKIES`
311300
indirectly.
312301

313-
314-
License
315-
-------
302+
## License
316303

317304
MIT, see LICENSE.
318305

319-
320-
Community
321-
---------
306+
## Community
322307

323308
Want to get involved? Here are a few ways:
324309

325-
* Find us in the #dflydev IRC channel on irc.freenode.org.
326-
* Mention [@dflydev](https://twitter.com/dflydev) on Twitter.
327-
* [![Join the chat at https://gitter.im/dflydev/dflydev-fig-cookies](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dflydev/dflydev-fig-cookies?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
310+
- Find us in the #dflydev IRC channel on irc.freenode.org.
311+
- Mention [@dflydev](https://twitter.com/dflydev) on Twitter.
312+
- [![Join the chat at https://gitter.im/dflydev/dflydev-fig-cookies](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dflydev/dflydev-fig-cookies?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

0 commit comments

Comments
 (0)