WSComun  1.6.5
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="\n", $cut=false, $charset=null, $wrap_quoted=true)
 
static file_content_type ($path, $name, $failover= 'application/octet-stream', $is_stream=false, $skip_suffix=false)
 
static get_mime_extensions ($mimetype=null)
 
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 13 del archivo WSCMime.php.

Documentación del constructor y destructor

__construct (   $default_charset = null)

Constructor

Parámetros
string$default_charset

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

Documentación de las funciones miembro

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 218 del archivo WSCMime.php.

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 81 del archivo WSCMime.php.

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 121 del archivo WSCMime.php.

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 135 del archivo WSCMime.php.

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 329 del archivo WSCMime.php.

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 612 del archivo WSCMime.php.

static fix_email (   $email)
static

Try to fix invalid email addresses

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

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 468 del archivo WSCMime.php.

static get_charset ( )
static

Returns message/object character set name

Devuelve
string Characted set name

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

static get_mime_extensions (   $mimetype = null)
static

Get mimetype => file extension mapping

Parámetros
stringMime-Type to get extensions for
Devuelve
array List of extensions matching the given mimetype or a hash array with ext -> mimetype mappings if $mimetype is not given

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

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 757 del archivo WSCMime.php.

static parse_headers (   $headers)
static

Split RFC822 header string into an associative array

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

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 58 del archivo WSCMime.php.

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 396 del archivo WSCMime.php.

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 506 del archivo WSCMime.php.


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