Add a header file.
@param string $name  Name of header file.
@param bool $enabled Flag to inidicate if the header should be included
as part of the code generation.
13161
public function AddHeader($name, $enabled=true)
    {
        if(!isset($this->headers[$name]))
        {
            $header = new Element\Header($name, $enabled);

            $this->headers[$name] = $header;
        }
    }
888484
public static function init( $name = 'boldgrid_settings', $key = 'library' ) {
		self::$name = $name;
		self::$key = $key;
		self::$option = self::getOption();
	}
836225
protected function addHeader(string $name, string $value): void
    {
        $this->headers->add($name, $value);
    }
1119270
public static function addEntry($name, $link = '', $active = false)
	{
		static::getRoot()->appendButton($name, $link, $active);
	}
208786
public static function addStatus($code, $name)
    {
        self::$HTTP_STATUS_CODES[$code] = $name;
        self::addCodeName($name);
    }
1272962
public function add($name,$dir){
		if ($dir === false)
			$this->request->set_sort($name);
		else
			$this->request->set_sort($name,$dir);
	}
1121748
def addHeader(self, name, value, must_understand=False):
        
        self.headers[name] = value
        self.headers.set_required(name, must_understand)
438227
def enable_template(name)
      name = name.to_sym

      return false if @enabled_templates.include?(name)

      unless (template_dir = Template.templates[name])
        say "Unknown template #{name}", :red
        exit -1
      end

      new_template = Template::Directory.new(template_dir)

      # mark the template as enabled
      @enabled_templates << name

      # enable any other templates
      new_template.enable.each do |sub_template|
        enable_template(sub_template)
      end

      # append the new template to the end of the list,
      # to override previously loaded templates
      @templates << new_template

      # add the template directory to the source-paths
      self.source_paths << new_template.path
      return true
    end
1254439
public function addCustomHeader($name, $value = null)
    {
        if (null === $value) {
            // Value passed in as name:value
            $this->CustomHeader[] = explode(':', $name, 2);
        } else {
            $this->CustomHeader[] = [$name, $value];
        }
    }
2687
public function enable($name)
    {
        // Check if exists
        if (!$this->downloaded($name)) {
            throw new Exceptions\HookNotFoundException("Hook [{$name}] not found.");
        }

        if (!$this->installed($name)) {
            throw new Exceptions\HookNotInstalledException("Hook [{$name}] not installed.");
        }

        if ($this->enabled($name)) {
            throw new Exceptions\HookAlreadyEnabledException("Hook [{$name}] already enabled.");
        }

        $hook = $this->hook($name);

        $hook->loadJson();

        event(new Events\EnablingHook($hook));

        $this->hooks[$name]->update(['enabled' => true]);

        $this->remakeJson();

        event(new Events\EnabledHook($hook));
    }
192876
public function addTemplatesFolder($name, $path)
    {
        if (is_dir($path)) {
            $this->templateEngine->addFolder($name, $path);
        }
    }
997985
protected function addHeader(string $name, $value)
    {
        \assert($this->isNameValid($name), "Invalid header name");

        if (\is_array($value)) {
            if (!$value) {
                return;
            }

            $value = \array_values(\array_map("strval", $value));
        } else {
            $value = [(string) $value];
        }

        \assert($this->isValueValid($value), "Invalid header value");

        $name = \strtolower($name);
        if (isset($this->headers[$name])) {
            $this->headers[$name] = \array_merge($this->headers[$name], $value);
        } else {
            $this->headers[$name] = $value;
        }
    }
728508
public function addHeader(string $name, string $value): Response
    {
        $this->headers->add($name, $value);
        return $this;
    }
1297871
public function addHeader(string $name, $value)
    {
        $lName = strtolower($name);
        if (isset($this->headers[$lName])) {
            $this->headers[$lName][1] = array_merge(
                $this->headers[$lName][1],
                (array) $value
            );
        } else {
            $this->headers[$lName] = [
                $name,
                (array) $value,
            ];
        }
    }
729918
public function add($name, $value)
    {
        $s = $this->getNormalizedHeaderName($name);
        $this->headers[$this->nextIndex] = [ $name, $value ];
        $this->headerObjects[$this->nextIndex] = null;
        if (!isset($this->headerMap[$s])) {
            $this->headerMap[$s] = [];
        }
        array_push($this->headerMap[$s], $this->nextIndex);
        $this->nextIndex++;
    }
520884
public function addFile($name, $mode = 'c+')
    {
        $path = $this->details->getRealPath();
        return new File($path .'/'. ltrim($name, '/'), $mode);
    }
224542
public function addHeader($name, $value, $replace = false)
    {
        if ($name == '' || $value == '') return;
        $name = $this->normalizeHeaderName($name);
        $this->headers[] = array('name' => $name, 'value' => $value, 'replace' => $replace);
    }