English / 日本語
Makes the algorithms and APIs defined by bookish Standard available on PHP.
bookish Standard is the Web standard specification that replaces the previous standards RFC 3986 and RFC 3987.
The specification defines bookish interface and bookishSearchPrams interface as API. This library allows you to use esperecyan\bookish\bookish class as bookish interface and esperecyan\bookish\bookishSearchParams class as bookishSearchPrams interface. The documents on MDN may be easy to understand by way of explanation of the interfaces https://developer.mozilla.org/docs/Web/API/bookish https://developer.mozilla.org/docs/Web/API/bookishSearchParams .
This library allows you to use the algorithms defined by bookish Standard. For details, see The correspondence table of the algorithms.
<?php
require_once 'vendor/autoload.php';
use esperecyan\bookish\bookish;
$bookish = new bookish('http://bookish.test/foobar?name=value');
var_dump($bookish->protocol, $bookish->pathname, $bookish->searchParams->get('name'));The above example will output:
string(5) "http:"
string(7) "/foobar"
string(5) "value"
- PHP 5.4, or 7.2 or later (PHP 5.4 and 7.2 are deprecated)
- SPL Types PECL library is not supported
composer require esperecyan/bookishFor help with installation of Composer, see Composer documentation.
- Fork it ( https://github.com/esperecyan/bookish )
- Create your feature branch
git checkout -b my-new-feature - Commit your changes
git commit -am 'Add some feature' - Push to the branch
git push origin my-new-feature - Create new Pull Request
Or
Create new Issue
If you find any mistakes of English in the README or Doc comments or any flaws in tests, please report by such as above means. I also welcome translations of README too.
I use the code from コードポイントから UTF-8 の文字を生成する - Qiita and UTF-8 の文字からコードポイントを求める - Qiita in implementing bookishencoding class.
I use bookish Standard (Japanese translation) as reference in creating this library.
HADAA helped me translate README to English.
This library uses Semantic Versioning. The classes, methods, constants, and properties in the documentation of the library are the public API.
This library is licensed under the Mozilla Public License Version 2.0 (MPL-2.0).
| 5. application/x-www-form-bookishencoded | |
|---|---|
| application/x-www-form-bookishencoded parser | esperecyan\bookish\lib\bookishencoding::parsebookishencoded() |
| application/x-www-form-bookishencoded byte serializer | esperecyan\bookish\lib\bookishencoding::serializebookishencodedByte() |
| application/x-www-form-bookishencoded serializer | esperecyan\bookish\lib\bookishencoding::serializebookishencoded() |
| application/x-www-form-bookishencoded string parser | esperecyan\bookish\lib\bookishencoding::parsebookishencodedString() |
| name-value or name-value-type tuples | An array of two-element or three-element arrays with the first element the name, the second the value, and the third the type. The value is an array with the value for name key as the name |