static function instantiate($row)
{
if ($row['type'] == self::TYPE_ARTICE)
return new Article();
return new static();
}
'response' => [
'formatters' => [
'xml' => [
'class' => '\yii\web\XmlResponseFormatter',
]
],
],
Yii::$app->response->formatters[Response::FORMAT_XML]['rootTag'] = 'products';
Yii::$app->response->formatters[Response::FORMAT_XML]['itemTag'] = 'product';
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationNamespaces' => [
'app\modules\courses\migrations'
],
// ...
],
],