sorry to be asking so many stupid questions in one day (but the documentation doesn’t seem to cover simple things too good)
what class in yii is responsible for string formatting?
is there even such a class?
for example i want to do the very common
str_to_lower, but i want to do it while supporting UTF8, so i need to add this custom function to some class in yii, which one? or do i create a separate application component? or how do you handle this simple thing with custom functions anyway?
You should use the mbstring functions in PHP. You can even override the standard string functions in PHP with their corresponding mbstring function. See here:
There’s no real “best practice” as Yii gives you much freedom. You could create a class with static methods in /components that Yii would autoinclude when you calll e.g. MyHelpers::doSomething(). Or you could use the approach used by Qiang in this cookbook article: