Basic mail headers collection functionality
Handles aggregation of headers
Populates headers from string representation
Parses a string for headers, and aggregates them, in order, in the current instance, primarily as strings until they are needed (they will be lazy loaded)
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
Return type: | Headers |
Set an alternate implementation for the PluginClassLoader
Parameters: | PluginClassLocator – |
---|---|
Return type: | Headers |
Return an instance of a PluginClassLocator, lazyload and inject map if necessary
Return type: | PluginClassLocator |
---|
Set the header encoding
Parameters: | string – |
---|---|
Return type: | Headers |
Add many headers at once
Expects an array (or Traversable object) of type/value pairs.
Parameters: | array|Traversable – |
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | Headers |
Add a raw header line, either in name => value, or as a single string ‘name: value’
This method allows for lazy-loading in that the parsing and instantiation of HeaderInterface object will be delayed until they are retrieved by either get() or current()
Parameters: |
|
---|---|
Return type: | Headers |
Remove a Header from the container
Parameters: | string – |
---|---|
Return type: | bool |
Clear all headers
Removes all headers from queue
Return type: | Headers |
---|
Get all headers of a certain name/type
Parameters: | string – |
---|---|
Return type: | bool|ArrayIterator|HeaderHeaderInterface Returns false if there is no headers with $name in this |
contain, an ArrayIterator if the header is a MultipleHeadersInterface instance and finally returns HeaderInterface for the rest of cases.
Test for existence of a type of header
Parameters: | string – |
---|---|
Return type: | bool |
Advance the pointer for this object as an iterator
Return the current key for this object as an iterator
Return type: | mixed |
---|
Is this iterator still valid?
Return type: | bool |
---|
Reset the internal pointer for this object as an iterator
Return the current value for this iterator, lazy loading it if need be
Return type: | HeaderHeaderInterface |
---|
Return the number of headers in this contain, if all headers have not been parsed, actual count could increase if MultipleHeader objects exist in the Request/Response. If you need an exact count, iterate
Return type: | int count of currently known headers |
---|
Render all headers at once
This method handles the normal iteration of headers; it is up to the concrete classes to prepend with the appropriate status/request line.
Return type: | string |
---|