File tree 1 file changed +26
-1
lines changed
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ This componenet automaticaly generates robots from parameters in configuration.
18
18
- You might also want to change mime type to ` text/plain ` .
19
19
- Modify parameters to accomplish your needs.
20
20
21
- ## Example configuration
21
+ ### Example configuration
22
22
23
23
```
24
24
services:
@@ -37,3 +37,28 @@ parameters:
37
37
- '/example'
38
38
- '/example2'
39
39
```
40
+
41
+ ### Example presenter
42
+
43
+ ```
44
+ class ExamplePresenter implements IPresenter
45
+ {
46
+ /** @var \Nepttune\Component\IRobotsFactory */
47
+ protected $iRobotsFactory;
48
+
49
+ public function __construct(\Nepttune\Component\IRobotsFactory $IRobotsFactory)
50
+ {
51
+ $this->iRobotsFactory = $IRobotsFactory;
52
+ }
53
+
54
+ public function actionRobots()
55
+ {
56
+ $this->getHttpResponse()->setContentType('text/plain');
57
+ }
58
+
59
+ protected function createComponentRobots()
60
+ {
61
+ return $this->iRobotsFactory->create();
62
+ }
63
+ }
64
+ ```
You can’t perform that action at this time.
0 commit comments