|
|
Zend Framework 2 Documentation (Manual) | |
|
File: /_sources/modules/zend.filter.base-name.txt
Size: | 745 |
Storage flags: | no_autoload,compress/gzip (43%) |
.. _zend.filter.set.basename:
BaseName
--------
``Zend\Filter\BaseName`` allows you to filter a string which contains the path to a file and it will return the
base name of this file.
.. _zend.filter.set.basename.options:
Supported Options
^^^^^^^^^^^^^^^^^
There are no additional options for ``Zend\Filter\BaseName``.
.. _zend.filter.set.basename.basic:
Basic Usage
^^^^^^^^^^^
A basic example of usage is below:
.. code-block:: php
:linenos:
$filter = new Zend\Filter\BaseName();
print $filter->filter('/vol/tmp/filename');
This will return 'filename'.
.. code-block:: php
:linenos:
$filter = new Zend\Filter\BaseName();
print $filter->filter('/vol/tmp/filename.txt');
This will return '``filename.txt``'.
For more information about the PHK package format: http://phk.tekwire.net