Net_NNTP
[ class tree: Net_NNTP ] [ index: Net_NNTP ] [ all elements ]

Class: Net_NNTP_Header

Source Location: /Net_NNTP-1.2.2/NNTP/Header.php

Class Overview


The Net_NNTP_Header class


Author(s):

Version:

  • $Id: Header.php,v 1.11.6.1 2005/03/28 16:26:58 heino Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 91]
The Net_NNTP_Header class
  • Author: Heino H. Gehlsen <heino@gehlsen.dk>
  • Version: $Id: Header.php,v 1.11.6.1 2005/03/28 16:26:58 heino Exp $
  • See: Net_NNTP_Message
  • Since: Class available since Release 0.10.0
  • Access: public


[ Top ]


Class Variables

$fields =

[line 101]

Container for the header fields
  • Access: public

Type:   array


[ Top ]



Method Detail

Net_NNTP_Header (Constructor)   [line 112]

Net_NNTP_Header Net_NNTP_Header( )

Constructor
  • Since: 0.1
  • Access: public

[ Top ]

add   [line 212]

void add( string $tag, string $value, [optional $index = null])

Add a new field
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 
string   $value   — 
optional   $index   —  int $index

[ Top ]

clean   [line 394]

void clean( )

Remove any header field that only contains whitespace.
  • Since: 0.1
  • Access: public

[ Top ]

cleanArray   [line 987]

array cleanArray( array $input)

Removes CRLF and misplaced empty lines before and after actual headerlines.
  • Since: 0.1
  • Access: public

Parameters:

array   $input   — 

[ Top ]

cleanString   [line 963]

string cleanString( $string, string $string.)

Removes CRLF and misplaced empty lines before and after actual headerlines.
  • Since: 0.1
  • Access: public

Parameters:

string   $string.   — 
   $string   — 

[ Top ]

count   [line 356]

int count( string $tag)

Returns the number of times the given field tag appears in the header.
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 

[ Top ]

create   [line 148]

object Net_NNTP_Header &create( [optional $input = null])

Create a new instance of Net_NNTP_Header
  • Return: object
  • Since: 0.1
  • Access: public

Parameters:

optional   $input   —  mixed $input Can be any of the following: (string) RFC2822 style header lines (CRLF included) (array) RFC2822 style header lines (CRLF not included) (object) Net_NNTP_Header object (object) Net_NNTP_Message object

[ Top ]

decodeString   [line 891]

string decodeString( string $input)

Given a header/string, this function will decode it according to RFC2047.

Probably not *exactly* conformant, but it does pass all the given examples (in RFC2047).

  • Return: Decoded header value
  • Since: 0.1
  • Access: public

Parameters:

string   $input   —  Input header value to decode

[ Top ]

delete   [line 270]

void delete( string $tag, [optional $index = null])

Delete a field
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 
optional   $index   —  int $index

[ Top ]

encodeString   [line 936]

string encodeString( string $string)

Encodes the string given in $string as per RFC2047
  • Return: Encoded string
  • Since: 0.1
  • Access: public

Parameters:

string   $string   —  The string to encode

[ Top ]

foldArray   [line 784]

array foldArray( array $array, [optional $maxlen = 78])

Folds an array of RFC2822 style header lines.
  • Since: 0.1
  • Access: public

Parameters:

array   $array   — 
optional   $maxlen   —  int $maxlen

[ Top ]

foldString   [line 813]

string foldString( string $string, [optional $maxlen = 78])

Folds a string by inserting CRLF's and TAB's where allowed
  • Since: 0.1
  • Access: public

Parameters:

string   $string   — 
optional   $maxlen   —  int $maxlen

[ Top ]

get   [line 300]

string get( string $tag, [optional $index = 0])

Gets the value of a header field
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 
optional   $index   —  int $index (defaults to 0)

[ Top ]

getAll   [line 330]

array getAll( string $tag, optional 1)

Gets the values of a all occurences of a field
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 
optional   1   —  int $index

[ Top ]

getFields   [line 478]

array getFields( optional $flags)

Get the array of header fields.
  • Since: 0.1
  • Access: public

Parameters:

optional   $flags   — 

[ Top ]

getFieldsArray   [line 512]

array getFieldsArray( [optional $flags = NET_NNTP_HEADER_GET_DEFAULT])

Export an array of RFC2822 style header style lines from the object.
  • Return: RFC2822 style header lines (CRLF not included)
  • Since: 0.1
  • Access: public

Parameters:

optional   $flags   — 

[ Top ]

getFieldsString   [line 495]

string getFieldsString( [optional $flags = NET_NNTP_HEADER_GET_DEFAULT])

Export a string of RFC2822 style header style lines from the object.
  • Return: RFC2822 style header lines (CRLF included)
  • Since: 0.1
  • Access: public

Parameters:

optional   $flags   — 

[ Top ]

replace   [line 240]

void replace( string $tag, string $value, [optional $index = null])

Replace a field's value
  • Since: 0.1
  • Access: public

Parameters:

string   $tag   — 
string   $value   — 
optional   $index   —  int $index

[ Top ]

reset   [line 127]

void reset( )

Reset the field container
  • Since: 0.1
  • Access: public

[ Top ]

setFields   [line 427]

void setFields( &$input, [optional $flags = NET_NNTP_HEADER_SET_DEFAULT], mixed $input)

Import RFC2822 style header lines given in $input into the object
  • Since: 0.1
  • Access: public

Parameters:

mixed   $input   —  Can be any of the following: (string) RFC2822 style header lines (CRLF included) (array) RFC2822 style header lines (CRLF not included) (object) Net_NNTP_Header object (object) Net_NNTP_Message object
optional   $flags   — 
   &$input   — 

[ Top ]

tags   [line 380]

array tags( )

Returns an array of all the tags that exist in the header.

Each tag will only appear in the list once.

  • Since: 0.1
  • Access: public

[ Top ]

unfoldArray   [line 747]

array unfoldArray( array $array)

Do the (RFC822 3.1.1) header unfolding to an array of RFC2822 header lines.
  • Return: Unfolded RFC2822 header lines (CRLF not included)
  • Since: 0.1
  • Access: public

Parameters:

array   $array   —  RFC2822 header lines to unfolded (CRLF not included)

[ Top ]

unfoldString   [line 724]

string unfoldString( string $string)

Do the (RFC822 3.1.1) header unfolding to a string of RFC2822 header lines.
  • Return: Unfolded RFC2822 header lines (CRLF included)
  • Since: 0.1
  • Access: public

Parameters:

string   $string   —  RFC2822 header lines to unfolded (CRLF included)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:30:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.