Set the content of default route provider.

@param string $name
@param array  $headers

@throws \Illuminate\Contracts\Filesystem\FileNotFoundException
502815
protected function setProviders(string $name, array $headers)
    {
        $this->info('Set default route provider...');

        $this->replaceFileContent(
            $this->path($name.'/resources/Providers/RouteServiceProvider.php'),
            $headers
        );
    }
1052107
public function addPathHeader($name, $path = null)
    {
        $this->storeHeader($name, $this->factory->createPathHeader($name, $path));
    }
193774
public function withHeaders( array $headers )
	{
		foreach ( $headers as $key => $value )
		{
			$this->headers->set( $key, $value );
		}

		return $this;
	}
1225676
public function changeHeader(string $name, string $value): void
    {
        // if (!array_key_exists($name, $this->headers)) {
            // throw new NotFoundException();
        // }
        $this->headers[$name] = $value;
    }
125819
private function setDefaultHeaders()
    {
        $defaultHeaders = [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'User-Agent' =>  Client::UA,
            'X-MOLTIN-SDK-LANGUAGE' => 'php',
            'X-MOLTIN-SDK-VERSION' => 'v2-dev'
        ];

        foreach($defaultHeaders as $name => $value) {
            if (!$this->getHeader($name)) {
                $this->addHeader($name, $value);
            }
        }

        return $this;
    }
904325
private function setHeaders(array $headers)
    {
        if ( ! empty($headers))
        {
            $this->setOption(CURLOPT_HTTPHEADER, $this->optionParser->parseHeaders($headers));
        }
        else
        {
            $this->unsetOption(CURLOPT_HTTPHEADER);
        }
    }
1290418
public function removeHeader($name)
    {
        $nameLower = strtolower($name);
        foreach ($this->_headers as &$h) {
            if ($h && strtolower($h[0]) == $nameLower) {
                $h = null;
            }
        }
    }
1191533
protected function replaceFileContent($path, array $headers)
    {
        $content = $this->files->get($path);
        $this->files->put($path, str_replace([
            'DummyNamespace',
            'DummyAutoload',
            'dummy_path'
        ], [
            $this->getNamespace($headers['plugin_namespace']),
            $this->getAutoloadNamespace($headers['plugin_namespace']),
            $this->getPluginPath()
        ], $content), true);
    }
1254920
public function setHeaders(array $headers)
    {
        $this->headerRemove();
        
        foreach ($headers as $name => $values) {
            foreach ((array)$values as $value) {
                $this->header("$name: $value", false);
            }
        }
    }
408306
protected function setPluginRootFile(string $name)
    {
        $this->info('Set plugin root file...');
        $this->files->move($this->path($name.'/plugin-name.php'), $this->path($name.'/'.$name.'.php'));
    }
1330474
private function addRoute($name, array $route)
    {
        extract($this->defaults($route));

        $requirements[RouteCollectionBuilder::K_NAME] = $name;

        $this->builder->addRoute($method, $pattern, $handler, $requirements, $defaults);
    }
839281
private function getHeader($name, $headers)
    {
        $headers = array_change_key_case($headers);
        $name = strtolower($name);

        return isset($headers[$name]) ? (string) $headers[$name] : false;
    }
1366674
protected function createRoutes(string $name): void
    {
        $webFile = base_path('modules/'.$name.'/Routes/service.php');
        if (! $this->files->exists($webFile)) {
            $this->files->put($webFile, $this->files->get(__DIR__.'/stubs/service-route.stub'));
        }
    }
519311
public function addMailboxHeader($name, $addresses = null)
    {
        $this->storeHeader($name, $this->factory->createMailboxHeader($name, $addresses));
    }
722983
public function headers( array $headers )
      : Request
   {

      $this->_defaultHeaders = array_merge( $this->_defaultHeaders, $headers );

      return $this;

   }
619404
public function renderByName($name)
    {
        $route = $this->getRoute($name);
        if (null === $route) {
            throw new RouteNotFoundException(sprintf('There is no route "%s".', $name));
        }

        $this->render($route, $name);
    }
1073224
public function setDefaultDriverName($name)
    {
        $name = strtolower($name);

        if (! isset($this->drivers[$name])) {
            throw new InvalidArgumentException("[W002] Driver '{$name}' is not registered.");
        }

        $this->default_driver = $name;
    }