Methods of yii\caching\Cache
:
madd()
,mget()
and mset()
,are the only (known to me) in entire Yii2 core, that are using abbreviated names. Following naming convetions used everywhere else, they should be named multiAdd
, multiGet
and multiSet
.
Does anyone know, why exception has been made for this one (?) class?
I'm reviewing a book about Yii2 right now, and I was so extremely surprised to findout these names, that at first I'd bet a lot, that book author made a mistake! Abreviated methods names in Yii2?
I think it was done in haste and is inherited from Yii1. http://www.yiiframework.com/doc/api/1.1/CCache#mget-detail
No one thought about it then. And now it is BC
UPD: Added in Ideas for 2.1
UPD2 https://github.com/yiisoft/yii2/pull/10296
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With