WSCOMUN  2.1.0
Web Services Comunes para PHP/GVHidra
Métodos públicos | Campos de datos | Métodos protegidos | Atributos protegidos
Referencia de la Clase WSCMimeParser

Métodos públicos

 __construct ($params=array())
 
 decode ($input, $convert=true)
 
 decodeMTOM ($vData, $convert=true)
 

Campos de datos

const WSC_CHARSET = 'UTF-8'
 

Métodos protegidos

 doDecode ($headers, $body, $default_ctype='text/plain')
 
 splitBodyHeader ($input)
 
 parseHeaders ($input)
 
 parseHeaderValue ($input)
 
 boundarySplit ($input, $boundary)
 
 decodeHeader ($input)
 
 structure_part (\stdClass $part, $count=0, $parent='')
 

Atributos protegidos

 $params
 

Descripción detallada

Definición en la línea 9 del archivo WSCMimeParser.php.

Documentación del constructor y destructor

◆ __construct()

__construct (   $params = array())

Constructor.

Sets up the object, initialise the variables, and splits and stores the header and body of the input.

Parámetros
array$paramsAn array of various parameters that determine various things: include_bodies - Whether to include the body in the returned object. decode_bodies - Whether to decode the bodies of the parts. (Transfer encoding) decode_headers - Whether to decode headers crlf - CRLF type to use (CRLF/LF/CR)

Definición en la línea 46 del archivo WSCMimeParser.php.

Documentación de las funciones miembro

◆ boundarySplit()

boundarySplit (   $input,
  $boundary 
)
protected

This function splits the input based on the given boundary

Parámetros
string$inputInput to parse
string$boundaryBoundary
Devuelve
array Contains array of resulting mime parts

Definición en la línea 326 del archivo WSCMimeParser.php.

◆ decode()

decode (   $input,
  $convert = true 
)

Performs the decoding process.

Parámetros
string$inputThe input to decode
bool$convertConvert result to WSCMessagePart structure
Devuelve
object|bool Decoded results or False on failure

Definición en la línea 60 del archivo WSCMimeParser.php.

◆ decodeHeader()

decodeHeader (   $input)
protected

Given a header, this function will decode it according to RFC2047. Probably not exactly conformant, but it does pass all the given examples (in RFC2047).

Parámetros
string$inputInput header value to decode
Devuelve
string Decoded header value

Definición en la línea 344 del archivo WSCMimeParser.php.

◆ decodeMTOM()

decodeMTOM (   $vData,
  $convert = true 
)

Realiza el proceso de decodificacion a un mensaje MTOM.

Parámetros
array$vDataArray resultante de aplicar un explode con la cadena de separacion (Nota: Primer y ultimo elementos vacios)
bool$convertConvert result to WSCMessagePart structure
Devuelve
object|bool Estructura decodificada o false en caso de fallo

Definición en la línea 80 del archivo WSCMimeParser.php.

◆ doDecode()

doDecode (   $headers,
  $body,
  $default_ctype = 'text/plain' 
)
protected

Performs the decoding. Decodes the body string passed to it If it finds certain content-types it will call itself in a recursive fashion

Parámetros
string$headersHeader section
string$bodyBody section
string$default_ctypeDefault content type
Devuelve
object|bool Decoded results or False on error

Definición en la línea 111 del archivo WSCMimeParser.php.

◆ parseHeaders()

parseHeaders (   $input)
protected

Parse headers given in $input and return as assoc array.

Parámetros
string$inputHeaders to parse
Devuelve
array Contains parsed headers

Definición en la línea 268 del archivo WSCMimeParser.php.

◆ parseHeaderValue()

parseHeaderValue (   $input)
protected

Function to parse a header value, extract first part, and any secondary parts (after ;) This function is not as robust as it could be. Eg. header comments in the wrong place will probably break it.

Parámetros
string$inputHeader value to parse
Devuelve
array Contains parsed result

Definición en la línea 298 del archivo WSCMimeParser.php.

◆ splitBodyHeader()

splitBodyHeader (   $input)
protected

Given a string containing a header and body section, this function will split them (at the first blank line) and return them.

Parámetros
string$inputInput to split apart
Devuelve
array Contains header and body section

Definición en la línea 247 del archivo WSCMimeParser.php.

◆ structure_part()

structure_part ( \stdClass  $part,
  $count = 0,
  $parent = '' 
)
protected

Recursive method to convert a WSCMimeParser structure into a WSCMessagePart object.

Parámetros
object$partA message part struct
int$countPart count
string$parentParent MIME ID
Devuelve
object WSCMessagePart
Ver también
self::decode()

Definición en la línea 360 del archivo WSCMimeParser.php.

Documentación de los campos

◆ $params

$params
protected
Valor inicial:
= array(
'include_bodies' => true,
'decode_bodies' => true,
'decode_headers' => true,
'crlf' => "\r\n",
'default_charset' => self::WSC_CHARSET,
)

Definición en la línea 17 del archivo WSCMimeParser.php.


La documentación para esta clase fue generada a partir del siguiente fichero: