Here's a pickle :)
In the old Yii you could instantiate models anywhere in protected. Regardless of the module you were in. Then the Yii team decided to go and mess everything up :) and decided to change the structure and code and now, I'm a bit lost...
1. HOW DO YOU INSTANTIATE MODELS? (anywhere in the project)
Old fashion way was $model = new Model();
where model could be in a totally different module and it would still work. How do we do this now? when I try to do it, it says: Class 'app\modules\somemodule\controllers\Model' not found
which is funny because I want a model and it searches in controllers...
2. SESSIONS IN YII
Old fashion way was
Yii::app()->session['var'] = 'value';
echo Yii::app()->session['var']; // Prints "value"
How are they done now?
L.E: Found my answer to the second question :D and sessions are handled about the same: Yii::$app->session['var'] = 'value';
the difference being the $... It's all about the $ :)
Thank you!
Ares.