helpers\BaseStringHelper basename()

basename() public static method

Returns the trailing name component of a path.

This method is similar to the php function basename() except that it will treat both \ and / as directory separators, independent of the operating system. This method was mainly created to work on php namespaces. When working with real file paths, php's basename() should work fine for you. Note: this method is not aware of the actual filesystem, or path components such as "..".

See also http://www.php.net/manual/en/function.basename.php.

public static string basename ( $path, $suffix = '' )
$path string

A path string.

$suffix string

If the name component ends in suffix this will also be cut off.

return string

The trailing name component of the given path.

doc_Yii
2016-10-30 17:05:29
Comments
Leave a Comment

Please login to continue.