$query = (new \yii\db\Query())
->select("CategoryID, CategoryName, CONCAT('Northwind Category', '' ) AS Note")
->from('categories');
$query = (new \yii\db\Query())
->select([
'CategoryID',
'CategoryName',
'Note' => new \yii\db\Expression("'Northwind Category'")])
->from('categories');
$query1 = (new \yii\db\Query())
->select("id, category_id AS type, name")
->from('post')
->limit(10);
$query2 = (new \yii\db\Query())
->select('id, type, name')
->from('user')
->limit(10);
$query1->union($query2);
$id = 2;
$c_name = 'common\models\Article';
$obj = new $c_name();
$obj::findOne($id);
$c_name = 'common\models\Article';
$obj = Yii::createObject($c_name);
$obj::findOne($id);
$obj = Yii::createObject([
'class' => 'common\models\Article',
'some_attr' => 'алюминий',
]);
$obj::findOne($id);