From 2ae0341294fa5043c3cb8d799706e4c155ed4da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Pel=C3=AD=C5=A1ek?= Date: Wed, 13 Mar 2019 19:24:03 +0100 Subject: [PATCH] Update Robots.php --- src/Robots.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Robots.php b/src/Robots.php index 05f04b4..5b52a26 100644 --- a/src/Robots.php +++ b/src/Robots.php @@ -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