From 1d2185f9acdabdeb32731d288c0dda3da6ea1071 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Mon, 10 Jun 2013 23:26:35 +0200 Subject: [PATCH] added note about usage to StringHelper::basename() --- framework/yii/helpers/base/StringHelper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/yii/helpers/base/StringHelper.php b/framework/yii/helpers/base/StringHelper.php index 5134bf6..7fbb960 100644 --- a/framework/yii/helpers/base/StringHelper.php +++ b/framework/yii/helpers/base/StringHelper.php @@ -43,8 +43,10 @@ class StringHelper /** * Returns the trailing name component of a path. - * This method does the same as the php function basename() except that it will + * This method does the same as the php function `basename()` except that it will * always use \ 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 "..". * @param string $path A path string. * @param string $suffix If the name component ends in suffix this will also be cut off.