Skip to content

Commit 2ae0341

Browse files
authored
Update Robots.php
1 parent 3ee0ae4 commit 2ae0341

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Robots.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@
1616

1717
final class Robots extends BaseComponent
1818
{
19+
private static $defaultConfig = [
20+
'all' => [
21+
'name' => '*',
22+
'disallow' => null,
23+
]
24+
];
25+
1926
/** @var array */
20-
private $robots;
27+
private $config;
2128

22-
public function __construct(array $robots)
29+
public function __construct(array $config)
2330
{
2431
parent::__construct();
2532

26-
$this->robots = $robots;
33+
$this->config = \array_merge_recursive(self::$defaultConfig, $config);
2734
}
2835

2936
protected function beforeRender() : void

0 commit comments

Comments
 (0)