-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs for Symfony Polyfill components
- Loading branch information
1 parent
ac45677
commit 8c04898
Showing
14 changed files
with
666 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: APC | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / APCu Component | ||
===================================== | ||
|
||
This component provides ``apcu_*`` functions and the ``APCUIterator`` class | ||
to users of the legacy APC extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-apcu | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-apcu>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
classes and functions, no matter if the `PHP APCu extension`_ is installed or | ||
not in your server. The only requirement is to have installed at least the | ||
`legacy APC extension`_. | ||
|
||
Provided Classes | ||
~~~~~~~~~~~~~~~~ | ||
|
||
* :phpclass:`APCUIterator` | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* :phpfunction:`apcu_add` | ||
* :phpfunction:`apcu_delete` | ||
* :phpfunction:`apcu_exists` | ||
* :phpfunction:`apcu_fetch` | ||
* :phpfunction:`apcu_store` | ||
* :phpfunction:`apcu_cache_info` | ||
* :phpfunction:`apcu_cas` | ||
* :phpfunction:`apcu_clear_cache` | ||
* :phpfunction:`apcu_dec` | ||
* :phpfunction:`apcu_inc` | ||
* :phpfunction:`apcu_sma_info` | ||
|
||
.. _`PHP APCu extension`: https://secure.php.net/manual/en/book.apcu.php | ||
.. _`legacy APC extension`: https://secure.php.net/manual/en/book.apc.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: Ctype | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / Ctype Component | ||
====================================== | ||
|
||
This component provides ``ctype_*`` functions to users who run PHP versions | ||
without the ctype extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-ctype | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-ctype>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
functions, no matter if the `PHP Ctype extension`_ is installed or not in your | ||
server. | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* :phpfunction:`ctype_alnum` | ||
* :phpfunction:`ctype_alpha` | ||
* :phpfunction:`ctype_cntrl` | ||
* :phpfunction:`ctype_digit` | ||
* :phpfunction:`ctype_graph` | ||
* :phpfunction:`ctype_lower` | ||
* :phpfunction:`ctype_print` | ||
* :phpfunction:`ctype_punct` | ||
* :phpfunction:`ctype_space` | ||
* :phpfunction:`ctype_upper` | ||
* :phpfunction:`ctype_xdigit` | ||
|
||
.. _`PHP Ctype extension`: https://secure.php.net/manual/en/book.ctype.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: Iconv | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / Iconv Component | ||
====================================== | ||
|
||
This component provides a native PHP implementation of the ``iconv_*`` | ||
functions to users who run PHP versions without the ``iconv`` extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-iconv | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-iconv>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
constants and functions, no matter if the `PHP iconv extension`_ is installed or | ||
not in your server. The only function not implemented in this component is | ||
:phpfunction:`ob_iconv_handler`. | ||
|
||
Provided Constants | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* ``ICONV_IMPL`` (value = ``'Symfony'``) | ||
* ``ICONV_VERSION`` (value = ``'1.0'``) | ||
* ``ICONV_MIME_DECODE_STRICT`` (value = ``1``) | ||
* ``ICONV_MIME_DECODE_CONTINUE_ON_ERROR`` (value = ``2``) | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
These functions are always available: | ||
|
||
* :phpfunction:`iconv` | ||
* :phpfunction:`iconv_get_encoding` | ||
* :phpfunction:`iconv_set_encoding` | ||
* :phpfunction:`iconv_mime_encode` | ||
* :phpfunction:`iconv_mime_decode_headers` | ||
|
||
These functions are only available when the ``mbstring`` or the ``xml`` | ||
extension are installed: | ||
|
||
* :phpfunction:`iconv_strlen` | ||
* :phpfunction:`iconv_strpos` | ||
* :phpfunction:`iconv_strrpos` | ||
* :phpfunction:`iconv_substr` | ||
* :phpfunction:`iconv_mime_decode` | ||
|
||
.. _`PHP iconv extension`: https://secure.php.net/manual/en/book.iconv.php | ||
.. _`mbstring`: https://secure.php.net/manual/en/book.mbstring.php | ||
.. _`xml`: https://secure.php.net/manual/en/book.xml.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: Intl | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / Intl Grapheme Component | ||
============================================== | ||
|
||
This component provides a partial, native PHP implementation of the | ||
``grapheme_*`` functions to users who run PHP versions without the ``intl`` | ||
extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-intl-grapheme | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-intl-grapheme>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
constants and functions, no matter if the `PHP intl extension`_ is installed or | ||
not in your server. | ||
|
||
Provided Constants | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* ``GRAPHEME_EXTR_COUNT`` (value = ``0``) | ||
* ``GRAPHEME_EXTR_MAXBYTES`` (value = ``1``) | ||
* ``GRAPHEME_EXTR_MAXCHARS`` (value = ``2``) | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* :phpfunction:`grapheme_extract` | ||
* :phpfunction:`grapheme_stripos` | ||
* :phpfunction:`grapheme_stristr` | ||
* :phpfunction:`grapheme_strlen` | ||
* :phpfunction:`grapheme_strpos` | ||
* :phpfunction:`grapheme_strripos` | ||
* :phpfunction:`grapheme_strrpos` | ||
* :phpfunction:`grapheme_strstr` | ||
* :phpfunction:`grapheme_substr` | ||
|
||
.. seealso:: | ||
|
||
The :doc:`polyfill-intl-icu </components/polyfill_intl_icu>` and | ||
:doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>` | ||
components provide polyfills for other classes and functions related to the | ||
Intl PHP extension. | ||
|
||
.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: ICU | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / Intl ICU Component | ||
========================================= | ||
|
||
This component provides a native PHP implementation of several Intl | ||
functions and classes to users who run PHP versions without the ``intl`` | ||
extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-intl-icu | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-intl-icu>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
classes and functions, no matter if the `PHP intl extension`_ is installed or | ||
not in your server. | ||
|
||
Provided Classes | ||
~~~~~~~~~~~~~~~~ | ||
|
||
* :phpclass:`Collator` | ||
* :phpclass:`IntlDateFormatter` | ||
* :phpclass:`Locale` | ||
* :phpclass:`NumberFormatter` | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* :phpfunction:`intl_error_name` | ||
* :phpfunction:`intl_get_error_code` | ||
* :phpfunction:`intl_get_error_message` | ||
* :phpfunction:`intl_is_failure` | ||
|
||
.. seealso:: | ||
|
||
The :doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>` and | ||
:doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>` | ||
components provide polyfills for other classes and functions related to the | ||
Intl PHP extension. | ||
|
||
.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. index:: | ||
single: Polyfill | ||
single: Normalizer | ||
single: Components; Polyfill | ||
|
||
The Symfony Polyfill / Intl Normalizer Component | ||
================================================ | ||
|
||
This component provides a fallback implementation for the ``Normalizer`` | ||
class to users who run PHP versions without the ``intl`` extension. | ||
|
||
Installation | ||
------------ | ||
|
||
.. code-block:: terminal | ||
$ composer require symfony/polyfill-intl-normalizer | ||
Alternatively, you can clone the `<https://github.com/symfony/polyfill-intl-normalizer>`_ repository. | ||
|
||
.. include:: /components/require_autoload.rst.inc | ||
|
||
Usage | ||
----- | ||
|
||
Once this component is installed in your application, you can use the following | ||
classes and functions, no matter if the `PHP intl extension`_ is installed or | ||
not in your server. | ||
|
||
Provided Classes | ||
~~~~~~~~~~~~~~~~ | ||
|
||
* :phpclass:`Normalizer` | ||
|
||
Provided Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
* :phpfunction:`normalizer_is_normalized` | ||
* :phpfunction:`normalizer_normalize` | ||
|
||
.. seealso:: | ||
|
||
The :doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>` and | ||
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>` components provide | ||
polyfills for other classes and functions related to the Intl PHP extension. | ||
|
||
.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php |
Oops, something went wrong.