1- Structured Headers parser for PHP
1+ Structured Field Values Parser for PHP
22=======================================
33
4- Parser and serializer for the [ Structured Headers for HTTP] [ 1 ] specification.
4+ Parser and serializer for the [ Structured Field Values for HTTP] [ 1 ] specification.
55
6- [ ![ Build Status] ( https://github.com/gapple/structured-headers /workflows/PHP%20Composer/badge.svg )] ( https://github.com/gapple/structured-headers /actions )
7- [ ![ codecov] ( https://codecov.io/gh/gapple/structured-headers /branch/master/graph/badge.svg )] ( https://codecov.io/gh/gapple/structured-headers )
6+ [ ![ Build Status] ( https://github.com/gapple/structured-fields /workflows/PHP%20Composer/badge.svg )] ( https://github.com/gapple/structured-fields /actions )
7+ [ ![ codecov] ( https://codecov.io/gh/gapple/structured-fields /branch/master/graph/badge.svg )] ( https://codecov.io/gh/gapple/structured-fields )
88
99
1010Installation
@@ -13,7 +13,7 @@ Installation
1313Using composer:
1414
1515```
16- composer require gapple/structured-headers
16+ composer require gapple/structured-fields
1717```
1818
1919API
2424The ` Parser::parseItem() ` method returns a ` [value, parameters] ` tuple.
2525
2626``` php
27- print_r(\gapple\StructuredHeaders \Parser::parseItem("42"));
27+ print_r(\gapple\StructuredFields \Parser::parseItem("42"));
2828
2929// Array
3030// (
@@ -40,7 +40,7 @@ print_r(\gapple\StructuredHeaders\Parser::parseItem("42"));
4040The ` Parser::parseList() ` method returns an array of ` [value, parameters] ` tuples.
4141
4242``` php
43- print_r(\gapple\StructuredHeaders \Parser::parseList("1, 42;towel;panic=?0"));
43+ print_r(\gapple\StructuredFields \Parser::parseList("1, 42;towel;panic=?0"));
4444
4545// Array
4646// (
@@ -68,7 +68,7 @@ print_r(\gapple\StructuredHeaders\Parser::parseList("1, 42;towel;panic=?0"));
6868The ` Parser::parseDictionary() ` method returns a ` \stdClass ` object with ` [value, parameters] ` tuples.
6969
7070``` php
71- print_r(\gapple\StructuredHeaders \Parser::parseDictionary("towel, panic=?0"));
71+ print_r(\gapple\StructuredFields \Parser::parseDictionary("towel, panic=?0"));
7272
7373// stdClass Object
7474// (
@@ -95,16 +95,16 @@ print_r(\gapple\StructuredHeaders\Parser::parseDictionary("towel, panic=?0"));
9595The ` Serializer::serializeItem() ` method.
9696
9797``` php
98- print_r(\gapple\StructuredHeaders \Serializer::serializeItem(true));
98+ print_r(\gapple\StructuredFields \Serializer::serializeItem(true));
9999// ?1
100100
101- print_r(\gapple\StructuredHeaders \Serializer::serializeItem(42));
101+ print_r(\gapple\StructuredFields \Serializer::serializeItem(42));
102102// 42
103103
104- print_r(\gapple\StructuredHeaders \Serializer::serializeItem("42"));
104+ print_r(\gapple\StructuredFields \Serializer::serializeItem("42"));
105105// "42"
106106
107- print_r(\gapple\StructuredHeaders \Serializer::serializeItem(new \gapple\StructuredHeaders \Bytes('🙂')));
107+ print_r(\gapple\StructuredHeStructuredFieldsaders \Serializer::serializeItem(new \gapple\StructuredFields \Bytes('🙂')));
108108// :8J+Zgg==:
109109```
110110
@@ -113,7 +113,7 @@ print_r(\gapple\StructuredHeaders\Serializer::serializeItem(new \gapple\Structur
113113The ` Serializer::serializeList() ` method.
114114
115115``` php
116- print_r(\gapple\StructuredHeaders \Serializer::serializeList([
116+ print_r(\gapple\StructuredFields \Serializer::serializeList([
117117 [1, (object) []],
118118 [42, (object) ['towel' => true, 'panic' => false]],
119119]));
@@ -126,7 +126,7 @@ print_r(\gapple\StructuredHeaders\Serializer::serializeList([
126126The ` Serializer::serializeDictionary() ` method.
127127
128128``` php
129- print_r(\gapple\StructuredHeaders \Serializer::serializeDictionary((object) [
129+ print_r(\gapple\StructuredFields \Serializer::serializeDictionary((object) [
130130 'towel' => [true, (object) []],
131131 'panic' => [false, (object) []],
132132]));
0 commit comments