moved magic methods

Fix for the issue - https://github.com/yiisoft/yii2/issues/2290. Related with option in this issue - https://github.com/yiisoft/yii2/issues/2291.