Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Copyright 2002-2017 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Copyright: 2002-2017 Horde LLC
License: http://www.horde.org/licenses/lgpl21 LGPL 2.1
File Size: 535 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Mime_Headers:: (21 methods):
  __construct()
  __clone()
  toArray()
  toString()
  addHeader()
  addHeaderOb()
  _getHeaderClassName()
  getHeader()
  removeHeader()
  parseHeaders()
  serialize()
  unserialize()
  offsetExists()
  offsetGet()
  offsetSet()
  offsetUnset()
  getIterator()
  __call()
  __callStatic()
  setEOL()
  getEOL()


Class: Horde_Mime_Headers  - X-Ref

This class represents the collection of header values for a single mail
message part.

It supports the base e-mail spec (RFC 5322) and the MIME extensions to that
spec (RFC 2045).

__construct()   X-Ref
Constructor.


__clone()   X-Ref
No description

toArray(array $opts = array()   X-Ref
Returns the headers in array format.

param: array $opts  Optional parameters:
return: array  The headers in array format. Keys are header names, but

toString(array $opts = array()   X-Ref
Returns all headers concatenated into a single string.

param: array $opts  See toArray().
return: string  The headers in string format.

addHeader($header, $value, array $opts = array()   X-Ref
Add/append/replace a header.

param: string $header  The header name.
param: string $value   The header value (UTF-8).
param: array $opts     DEPRECATED

addHeaderOb(Horde_Mime_Headers_Element $ob, $check = false)   X-Ref
Add a Horde_Mime_Headers_Element object to the current header list.

param: Horde_Mime_Headers_Element $ob  Header object to add.
param: boolean $check                  Check that the header and object

_getHeaderClassName($header)   X-Ref
Return the header class to use for a header name.

param: string $header  The header name.
return: string  The Horde_Mime_Headers_* class to use.

getHeader($header)   X-Ref
Get a header from the header array.

param: string $header  The header name.
return: Horde_Mime_Headers_Element  Element object, or null if not

removeHeader($header)   X-Ref
Remove a header from the header array.

param: string $header  The header name.

parseHeaders($text)   X-Ref
Builds a Horde_Mime_Headers object from header text.

param: mixed $text  A text string (or, as of 2.3.0, a Horde_Stream
return: Horde_Mime_Headers  A new Horde_Mime_Headers object.

serialize()   X-Ref
Serialization.

return: string  Serialized data.

unserialize($data)   X-Ref
Unserialization.

param: string $data  Serialized data.

offsetExists($offset)   X-Ref
Does header exist?

param: string $header  Header name.
return: boolean  True if header exists.

offsetGet($offset)   X-Ref
Return header element object.

param: string $header  Header name.
return: Horde_Mime_Headers_Element  Element object, or null if not

offsetSet($offset, $value)   X-Ref
Store a header element object.

param: string $offset                   Not used.
param: Horde_Mime_Headers_Element $elt  Header element.

offsetUnset($offset)   X-Ref
Remove a header element object.

param: string $offset  Header name.

getIterator()   X-Ref


__call($name, $arguments)   X-Ref
Handle deprecated methods.


__callStatic($name, $arguments)   X-Ref
Handle deprecated static methods.


setEOL($eol)   X-Ref


getEOL()   X-Ref