Library/HeadersManager.php
public function add($path, $position = 0)
    {
        if (!\is_string($path)) {
            throw new \InvalidArgumentException('$path must be only string type');
        }

        if (!$position) {
            $this->headers[$path] = $path;
        } else {
            switch ($position) {
                case self::POSITION_FIRST:
                    $this->headersFirst[$path] = $path;
                    break;
                case self::POSITION_LAST:
                    $this->headersLast[$path] = $path;
                    break;
                default:
                    break;
            }
        }
    }
public function add($path, $position = 0)
    {
        if (!\is_string($path)) {
            throw new \InvalidArgumentException('$path must be only string type');
        }

        if (!$position) {
            $this->headers[$path] = $path;
        } else {
            switch ($position) {
                case self::POSITION_FIRST:
                    $this->headersFirst[$path] = $path;
                    break;
                case self::POSITION_LAST:
                    $this->headersLast[$path] = $path;
                    break;
                default:
                    break;
            }
        }
    }
public function add ( $ path , $ position = 0 ) { if ( ! \ is_string ( $ path ) ) { throw new \ InvalidArgumentException ( '$path must be only string type' ) ; } if ( ! $ position ) { $ this -> headers [ $ path ] = $ path ; } else { switch ( $ position ) { case self :: POSITION_FIRST : $ this -> headersFirst [ $ path ] = $ path ; break ; case self :: POSITION_LAST : $ this -> headersLast [ $ path ] = $ path ; break ; default : break ; } } }
Adds a header path to the manager.

@param string $path
@param int    $position

@throws \InvalidArgumentException
Adds a header path to the manager .