|
|
Zend Framework 2 Documentation (Manual) | |
|
File: /_sources/modules/zend.filter.word.dash-to-underscore.txt
Size: | 631 |
Storage flags: | no_autoload,compress/gzip (51%) |
.. _zend.filter.set.dashtounderscore:
DashToUnderscore
----------------
This filter modifies a given string such that 'words-with-dashes' are converted to 'words_with_dashes'.
.. _zend.filter.set.dashtounderscore.options:
Supported Options
^^^^^^^^^^^^^^^^^
There are no additional options for ``Zend\Filter\Word\DashToUnderscore``:
.. _zend.filter.set.dashtounderscore.basic:
Basic Usage
^^^^^^^^^^^
A basic example of usage is below:
.. code-block:: php
:linenos:
$filter = new Zend\Filter\Word\DashToUnderscore();
print $filter->filter('this-is-my-content');
The above example returns 'this_is_my_content'.
For more information about the PHK package format: http://phk.tekwire.net