|
Size: | 8970 |
Storage flags: | no_autoload,compress/gzip (31%) |
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.
There are no additional options for Zend\Filter\BaseName.
A basic example of usage is below:
1 2 3 | $filter = new Zend\Filter\BaseName();
print $filter->filter('/vol/tmp/filename');
|
This will return ‘filename’.
1 2 3 | $filter = new Zend\Filter\BaseName();
print $filter->filter('/vol/tmp/filename.txt');
|
This will return ‘filename.txt‘.
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.