Hoa central
Static Public Member Functions | List of all members
Hoa\Mail\Content\Encoder\Base64 Class Reference
Inheritance diagram for Hoa\Mail\Content\Encoder\Base64:

Static Public Member Functions

static encode ($string, $isHeaderValue=false)
 
static decode ($string, $isHeaderValue=false)
 

Detailed Description

Class .

Encode and decode a string as described in the RFC4648, RFC2045 Section 6.8 and RFC2047.

Definition at line 50 of file Base64.php.

Member Function Documentation

static Hoa\Mail\Content\Encoder\Base64::decode (   $string,
  $isHeaderValue = false 
)
static

Decode from base64.

Parameters
string$stringString to decode.
bool$isHeaderValueWhether the string is a header value.
Returns
string

Implements Hoa\Mail\Content\Encoder\Encoder.

Definition at line 88 of file Base64.php.

89  {
90  throw new Mail\Exception('Not implemented.', 0);
91  }
static Hoa\Mail\Content\Encoder\Base64::encode (   $string,
  $isHeaderValue = false 
)
static

Encode into base64.

Parameters
string$stringString to encode.
bool$isHeaderValueWhether the string is a header value.
Returns
string

Implements Hoa\Mail\Content\Encoder\Encoder.

Definition at line 59 of file Base64.php.

60  {
61  $pre = null;
62  $post = null;
63 
64  if (true === $isHeaderValue) {
65  $pre = '=?utf-8?B?';
66  $post = '?=';
67  }
68 
69  return
70  $pre .
71  trim(
72  chunk_split(
73  base64_encode($string),
74  76,
75  CRLF
76  )
77  ) .
78  $post;
79  }

Here is the caller graph for this function:


The documentation for this class was generated from the following file: