protected function addOptionalHeaders($options)
    {
        if (!empty($options['headers'])) {
            foreach ((array) $options['headers'] as $header) {
                list($name, $value) = array_pad((array) $header, 2, null);
                $this->addHeader($name, $value);
            }
        }

        return $this;
    }
protected function addOptionalHeaders($options)
    {
        if (!empty($options['headers'])) {
            foreach ((array) $options['headers'] as $header) {
                list($name, $value) = array_pad((array) $header, 2, null);
                $this->addHeader($name, $value);
            }
        }

        return $this;
    }
protected function addOptionalHeaders ( $ options ) { if ( ! empty ( $ options [ 'headers' ] ) ) { foreach ( ( array ) $ options [ 'headers' ] as $ header ) { list ( $ name , $ value ) = array_pad ( ( array ) $ header , 2 , null ) ; $ this -> addHeader ( $ name , $ value ) ; } } return $ this ; }
Adds headers from options
@param array $options
@return $this
Adds headers from options