tacoberu / php-naiacode
De/Serialization text with meta from/to human readable text string.
v1.0.2
2021-02-19 00:49 UTC
Requires
- php: >=5.3.0
- ext-json: *
Requires (Dev)
- php: >=5.3.0
- phpunit/phpunit: ^4
- tracy/tracy: @dev
This package is auto-updated.
Last update: 2024-12-19 09:43:35 UTC
README
De/Serialization text with meta from/to human readable text string.
$str =
"Any-Header: with value
Meta: {"vendor":"zim","ver":"0.4"}
Content-Type: text/x-zim-wiki
And Lorem ipsum doler ist.";
(new Decoder())->decode($str) == [
"And Lorem ipsum doler ist.",
[
'any-header' => "with value",
'meta' => (object) [
'vendor' => 'zim',
'ver' => '0.4',
],
'content-type' => "text/x-zim-wiki",
]
]
And encoding similarly.