Skip to content

Commit

Permalink
Update Robots.php
Browse files Browse the repository at this point in the history
  • Loading branch information
peldax committed Mar 13, 2019
1 parent 3ee0ae4 commit 2ae0341
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Robots.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@

final class Robots extends BaseComponent
{
private static $defaultConfig = [
'all' => [
'name' => '*',
'disallow' => null,
]
];

/** @var array */
private $robots;
private $config;

public function __construct(array $robots)
public function __construct(array $config)
{
parent::__construct();

$this->robots = $robots;
$this->config = \array_merge_recursive(self::$defaultConfig, $config);
}

protected function beforeRender() : void
Expand Down

0 comments on commit 2ae0341

Please sign in to comment.