1
- <?php
2
- /***
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details.
5
- */
6
- namespace Magento \Swagger \Helper ;
7
-
8
- /**
9
- * Class Data
10
- * @package Magento\Swagger\Helper\Data
11
- */
12
- class Data extends \Magento \Framework \App \Helper \AbstractHelper
13
- {
14
-
15
- /**
16
- * @var \Magento\Framework\App\Request\Http
17
- */
18
- protected $ request ;
19
-
20
- /**
21
- * @param \Magento\Framework\App\Helper\Context $context
22
- * @param \Magento\Framework\App\Request\Http $request
23
- */
24
- public function __construct (
25
- \Magento \Framework \App \Helper \Context $ context ,
26
- \Magento \Framework \App \Request \Http $ request
27
- ) {
28
- $ this ->request = $ request ;
29
- parent ::__construct ($ context );
30
- }
31
-
32
- /**
33
- * @return mixed|string
34
- */
35
- public function getParamStore ()
36
- {
37
- return ($ this ->request ->getParam ('store ' )) ? $ this ->request ->getParam ('store ' ) : 'all ' ;
38
- }
39
- }
1
+ <?php
2
+ /***
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Swagger \Helper ;
7
+
8
+ /**
9
+ * Class Data
10
+ * @package Magento\Swagger\Helper\Data
11
+ */
12
+ class Data extends \Magento \Framework \App \Helper \AbstractHelper
13
+ {
14
+
15
+ /**
16
+ * @var \Magento\Framework\App\Request\Http
17
+ */
18
+ protected $ request ;
19
+
20
+ /**
21
+ * @param \Magento\Framework\App\Helper\Context $context
22
+ * @param \Magento\Framework\App\Request\Http $request
23
+ */
24
+ public function __construct (
25
+ \Magento \Framework \App \Helper \Context $ context ,
26
+ \Magento \Framework \App \Request \Http $ request
27
+ ) {
28
+ $ this ->request = $ request ;
29
+ parent ::__construct ($ context );
30
+ }
31
+
32
+ /**
33
+ * @return mixed|string
34
+ */
35
+ public function getParamStore ()
36
+ {
37
+ return ($ this ->request ->getParam ('store ' )) ? $ this ->request ->getParam ('store ' ) : 'all ' ;
38
+ }
39
+
40
+ /**
41
+ * @return string
42
+ */
43
+ public function getSchemaUrl ()
44
+ {
45
+ return rtrim ($ this ->getBaseUrl (), '/ ' ) . '/rest/ ' . $ this ->getParamStore () . '/schema?services=all ' ;
46
+ }
47
+ }
0 commit comments