[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/horde/framework/Horde/ -> Mime.php (summary)

(no description)

File Size: 711 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Mime:: (12 methods):
  is8bit()
  encode()
  _encode()
  quotedPrintableEncode()
  decode()
  encodeParam()
  decodeParam()
  generateMessageId()
  mimeIdArithmetic()
  isChild()
  uudecode()
  _uudecode()


Class: Horde_Mime  - X-Ref

The Horde_Mime:: class provides methods for dealing with various MIME (see,
e.g., RFC 2045-2049; 2183; 2231) standards.

-----

This file contains code adapted from PEAR's Mail_mimeDecode library (v1.5).

http://pear.php.net/package/Mail_mime

This code appears in Horde_Mime::decodeParam().

This code was originally released under this license:

LICENSE: This LICENSE is in the BSD license style.
Copyright (c) 2002-2003, Richard Heyes <richard@phpguru.org>
Copyright (c) 2003-2006, PEAR <pear-group@php.net>
All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the authors, nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

-----

This file contains code adapted from PEAR's PHP_Compat library (v1.6.0a3).

http://pear.php.net/package/PHP_Compat

This code appears in Horde_Mime::_uudecode().

This code was originally released under the LGPL 2.1

-----

Copyright 1999-2014 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.

is8bit($string, $charset = null)   X-Ref
Determines if a string contains 8-bit (non US-ASCII) characters.

param: string $string   The string to check.
param: string $charset  The charset of the string. Defaults to
return: boolean  True if string contains non US-ASCII characters.

encode($text, $charset = 'UTF-8')   X-Ref
MIME encodes a string (RFC 2047).

param: string $text     The text to encode (UTF-8).
param: string $charset  The character set to encode to.
return: string  The MIME encoded string (US-ASCII).

_encode($text, $charset)   X-Ref
Internal helper function to MIME encode a string.

param: string $text     The text to encode.
param: string $charset  The character set of the text.
return: string  The MIME encoded text.

quotedPrintableEncode($text, $eol = self::EOL,$wrap = 76)   X-Ref
Encodes a line via quoted-printable encoding.

param: string $text   The text to encode (UTF-8).
param: string $eol    The EOL sequence to use.
param: integer $wrap  Wrap a line at this many characters.
return: string  The quoted-printable encoded string.

decode($string)   X-Ref
Decodes a MIME encoded (RFC 2047) string.

param: string $string  The MIME encoded text.
return: string  The decoded text.

encodeParam($name, $val, array $opts = array()   X-Ref
No description

decodeParam($type, $data)   X-Ref
Decodes a MIME parameter string pursuant to RFC 2183 & 2231
(Content-Type and Content-Disposition headers).

param: string $type  Either 'Content-Type' or 'Content-Disposition'
param: mixed $data   The text of the header or an array of param name
return: array  An array with the following entries (all strings in

generateMessageId()   X-Ref
Generates a Message-ID string conforming to RFC 2822 [3.6.4] and the
standards outlined in 'draft-ietf-usefor-message-id-01.txt'.

param: string  A message ID string.

mimeIdArithmetic($id, $action, $options = array()   X-Ref
Performs MIME ID "arithmetic" on a given ID.

param: string $id      The MIME ID string.
param: string $action  One of the following:
param: array $options  Additional options:
return: mixed  The resulting ID string, or null if that ID can not

isChild($base, $id)   X-Ref
Determines if a given MIME ID lives underneath a base ID.

param: string $base  The base MIME ID.
param: string $id    The MIME ID to query.
return: boolean  Whether $id lives underneath $base.

uudecode($input)   X-Ref
Scans $input for uuencoded data and converts it to unencoded data.

param: string $input  The input data
return: array  A list of arrays, with each array corresponding to

_uudecode($input)   X-Ref
PHP 5's built-in convert_uudecode() is broken. Need this wrapper.

param: string $input  UUencoded input.
return: string  Decoded string.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1