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