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.