'auth' => 'auth/login',
'delivery/admin-auth' => 'delivery/admin-auth',
['class' => 'yii\rest\UrlRule', 'controller' => ['task']],
- 'flowwow/feed/<id:\d+>' => 'flowwow/feed',
'POST data-buh/request/<inn:\d+>' => 'data-buh/request'
],
],
+++ /dev/null
-<?php
-namespace app\controllers;
-use Yii;
-use yii\web\Controller;
-use yii_app\services\MarketplaceService;
-use yii\web\Response;
-
-class FlowwowController extends Controller
-{
- /**
- * Экшен для генерации и отображения XML-фида.
- *
- * @return string
- */
- public function actionFeed($id)
- {
-
- $productsInfo = MarketplaceService::getAllProductsInfo($id);
-
-
-
- $xmlFeed = MarketplaceService::createXMLFeed($productsInfo);
-
- // Устанавливаем заголовок, чтобы отдать XML
- Yii::$app->response->format = Response::FORMAT_RAW;
- Yii::$app->response->headers->add('Content-Type', 'application/xml; charset=utf-8');
-
- return $xmlFeed;
- }
-}
\ No newline at end of file
'enablePrettyUrl' => true,
'enableStrictParsing' => false,
'showScriptName' => false,
- 'rules' => [],
+ 'rules' => [
+ 'flowwow/feed/<id:\d+>' => 'flowwow/feed',
+ ],
+
],
'request' => [
'scriptUrl' => '/',
--- /dev/null
+<?php
+namespace app\controllers;
+use Yii;
+use yii\web\Controller;
+use yii_app\services\MarketplaceService;
+use yii\web\Response;
+
+class FlowwowController extends Controller
+{
+ /**
+ * Экшен для генерации и отображения XML-фида.
+ *
+ * @return string
+ */
+ public function actionFeed($id)
+ {
+
+ $productsInfo = MarketplaceService::getAllProductsInfo($id);
+
+
+
+ $xmlFeed = MarketplaceService::createXMLFeed($productsInfo);
+
+ // Устанавливаем заголовок, чтобы отдать XML
+ Yii::$app->response->format = Response::FORMAT_RAW;
+ Yii::$app->response->headers->add('Content-Type', 'application/xml; charset=utf-8');
+
+ return $xmlFeed;
+ }
+}
\ No newline at end of file