Skip to content

Commit 46933a4

Browse files
committed
Adding the ParameterAccess interface
1 parent 3830872 commit 46933a4

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All Notable changes to `bakame/http-strucured-fields` will be documented in this
77
### Added
88

99
- Introduce the`MemberContainer` interface.
10+
- Introduce the`ParameterAccess` interface.
1011
- `OrderedList`, `InnerList` now implements the `MemberList` interface.
1112
- `Parameters` and `Dictionnary` now implements the PHP `MemberOrderedMap` interface.
1213
- `Token::value` is a readonly property.

src/InnerList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @implements MemberList<int, Item>
1818
*/
19-
final class InnerList implements MemberList
19+
final class InnerList implements MemberList, ParameterAccess
2020
{
2121
/** @var array<int, Item> */
2222
private array $members;

src/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use function substr;
2121
use function trim;
2222

23-
final class Item implements StructuredField
23+
final class Item implements StructuredField, ParameterAccess
2424
{
2525
private function __construct(
2626
private Token|ByteSequence|int|float|string|bool $value,

src/ParameterAccess.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Bakame\Http\StructuredFields;
6+
7+
/**
8+
* @property-read MemberOrderedMap<string, StructuredField> $parameters
9+
*/
10+
interface ParameterAccess
11+
{
12+
}

0 commit comments

Comments
 (0)