WSCOMUN  2.1.2
Web Services Comunes para PHP/GVHidra
Métodos públicos | Métodos públicos estáticos | Campos de datos
Referencia de la Clase WSCMime

Métodos públicos

 __construct ($default_charset=null)
 

Métodos públicos estáticos

static get_charset ()
 
static parse_message ($raw_body)
 
static decode_address_list ($input, $max=null, $decode=true, $fallback=null, $addronly=false)
 
static decode_header ($input, $fallback=null)
 
static decode_mime_string ($input, $fallback=null)
 
static decode ($input, $encoding='7bit')
 
static parse_headers ($headers)
 
static explode_header_string ($separator, $str, $remove_comments=false)
 
static unfold_flowed ($text, $mark=null)
 
static format_flowed ($text, $length=72, $charset=null)
 
static wordwrap ($string, $width=75, $break="\, $cut=false, $charset=null, $wrap_quoted=true)
 
static file_content_type ($path, $name, $failover='application/octet-stream', $is_stream=false, $skip_suffix=false)
 
static image_content_type ($data)
 
static fix_email ($email)
 

Campos de datos

const WSC_CHARSET = 'UTF-8'
 

Descripción detallada

Definición en la línea 15 del archivo WSCMime.php.

Documentación del constructor y destructor

◆ __construct()

__construct (   $default_charset = null)

Constructor

Parámetros
string$default_charset

Definición en la línea 25 del archivo WSCMime.php.

Documentación de las funciones miembro

◆ decode()

static decode (   $input,
  $encoding = '7bit' 
)
static

Decode a mime part

Parámetros
string$inputInput string
string$encodingPart encoding
Devuelve
string Decoded string

Definición en la línea 222 del archivo WSCMime.php.

◆ decode_address_list()

static decode_address_list (   $input,
  $max = null,
  $decode = true,
  $fallback = null,
  $addronly = false 
)
static

Split an address list into a structured array list

Parámetros
string$inputInput string
int$maxList only this number of addresses
boolean$decodeDecode address strings
string$fallbackFallback charset if none specified
boolean$addronlyReturn flat array with e-mail addresses only
Devuelve
array Indexed list of addresses

Definición en la línea 83 del archivo WSCMime.php.

◆ decode_header()

static decode_header (   $input,
  $fallback = null 
)
static

Decode a message header value

Parámetros
string$inputHeader value
string$fallbackFallback charset if none specified
Devuelve
string Decoded string

Definición en la línea 123 del archivo WSCMime.php.

◆ decode_mime_string()

static decode_mime_string (   $input,
  $fallback = null 
)
static

Decode a mime-encoded string to internal charset

Parámetros
string$inputHeader value
string$fallbackFallback charset if none specified
Devuelve
string Decoded string

Definición en la línea 137 del archivo WSCMime.php.

◆ explode_header_string()

static explode_header_string (   $separator,
  $str,
  $remove_comments = false 
)
static

Explodes header (e.g. address-list) string into array of strings using specified separator characters with proper handling of quoted-strings and comments (RFC2822)

Parámetros
string$separatorString containing separator characters
string$strHeader string
bool$remove_commentsEnable to remove comments
Devuelve
array Header items

Definición en la línea 334 del archivo WSCMime.php.

◆ file_content_type()

static file_content_type (   $path,
  $name,
  $failover = 'application/octet-stream',
  $is_stream = false,
  $skip_suffix = false 
)
static

A method to guess the mime_type of an attachment.

Parámetros
string$pathPath to the file or file contents
string$nameFile name (with suffix)
string$failoverMime type supplied for failover
boolean$is_streamSet to True if $path contains file contents
boolean$skip_suffixSet to True if the config/mimetypes.php mappig should be ignored
Devuelve
string
Autor
Till Klampaeckel till@.nosp@m.php..nosp@m.net
Ver también
http://de2.php.net/manual/en/ref.fileinfo.php
http://de2.php.net/mime_content_type

Definición en la línea 617 del archivo WSCMime.php.

◆ fix_email()

static fix_email (   $email)
static

Try to fix invalid email addresses

Definición en la línea 766 del archivo WSCMime.php.

◆ format_flowed()

static format_flowed (   $text,
  $length = 72,
  $charset = null 
)
static

Wrap the given text to comply with RFC 2646

Parámetros
string$textText to wrap
int$lengthLength
string$charsetCharacter encoding of $text
Devuelve
string Wrapped text

Definición en la línea 473 del archivo WSCMime.php.

◆ get_charset()

static get_charset ( )
static

Returns message/object character set name

Devuelve
string Characted set name

Definición en la línea 40 del archivo WSCMime.php.

◆ image_content_type()

static image_content_type (   $data)
static

Detect image type of the given binary data by checking magic numbers.

Parámetros
string$dataBinary file content
Devuelve
string Detected mime-type or jpeg as fallback

Definición en la línea 752 del archivo WSCMime.php.

◆ parse_headers()

static parse_headers (   $headers)
static

Split RFC822 header string into an associative array

Definición en la línea 243 del archivo WSCMime.php.

◆ parse_message()

static parse_message (   $raw_body)
static

Parse the given raw message source and return a structure of message_part.

It makes use of the WSCMimeParser library

Parámetros
string$raw_bodyThe message source
Devuelve
object WSCMessagePart The message structure

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

◆ unfold_flowed()

static unfold_flowed (   $text,
  $mark = null 
)
static

Interpret a format=flowed message body according to RFC 2646

Parámetros
string$textRaw body formatted as flowed text
string$markMark each flowed line with specified character
Devuelve
string Interpreted text with unwrapped lines and stuffed space removed

Definición en la línea 401 del archivo WSCMime.php.

◆ wordwrap()

static wordwrap (   $string,
  $width = 75,
  $break = "\n",
  $cut = false,
  $charset = null,
  $wrap_quoted = true 
)
static

Improved wordwrap function with multibyte support. The code is based on Zend_Text_MultiByte::wordWrap().

Parámetros
string$stringText to wrap
int$widthLine width
string$breakLine separator
bool$cutEnable to cut word
string$charsetCharset of $string
bool$wrap_quotedWhen enabled quoted lines will not be wrapped
Devuelve
string Text

Definición en la línea 511 del archivo WSCMime.php.


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