PHP Class Horde_Kolab_Storage_Object_MimeType, horde

Copyright 2011-2016 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.
ファイルを表示 Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getMimeTypeFromObjectType ( string $type ) : string Determine the mime type given the object type.
getMimeTypesFromFolderType ( string $type ) : array Determine the mime type given the type of the folder that holds the object.
getObjectTypeFromMimePart ( Horde_Mime_Part $structure, string $id ) : string | boolean Determine the object type based on a specific MIME part that carries a Kolab object.
getObjectTypeFromMimeType ( string $mime_type ) : string | boolean Determine the object type based on the mime type of a Kolab object.
matchMimePartToFolderType ( Horde_Mime_Part $structure, string $type ) : array | boolean Tries to determine the MIME part that carries an object matching the specified folder type.
matchMimePartToHeaderType ( Horde_Mime_Part $structure, Horde_Mime_Headers $headers ) : string | boolean Try to determine the MIME part that carries an object matching based on the message headers.
matchMimePartToObjectType ( Horde_Mime_Part $structure, string $type ) : string | boolean Try to determine the MIME part that carries the object of the specified type.

Method Details

getMimeTypeFromObjectType() public static method

Determine the mime type given the object type.
public static getMimeTypeFromObjectType ( string $type ) : string
$type string The object type.
return string The mime type associated to the object type.

getMimeTypesFromFolderType() public static method

Determine the mime type given the type of the folder that holds the object.
public static getMimeTypesFromFolderType ( string $type ) : array
$type string The folder type.
return array The mime types associated to the folder type.

getObjectTypeFromMimePart() public static method

Determine the object type based on a specific MIME part that carries a Kolab object.
public static getObjectTypeFromMimePart ( Horde_Mime_Part $structure, string $id ) : string | boolean
$structure Horde_Mime_Part A structural representation of the mime message.
$id string The MIME part carrying the Kolab object.
return string | boolean The object type or false if no matching object type was found.

getObjectTypeFromMimeType() public static method

Determine the object type based on the mime type of a Kolab object.
public static getObjectTypeFromMimeType ( string $mime_type ) : string | boolean
$mime_type string The MIME type of the Kolab object.
return string | boolean The object type or false if no matching object type was found.

matchMimePartToFolderType() public static method

Tries to determine the MIME part that carries an object matching the specified folder type.
public static matchMimePartToFolderType ( Horde_Mime_Part $structure, string $type ) : array | boolean
$structure Horde_Mime_Part A structural representation of the mime message.
$type string The folder type.
return array | boolean The MIME ID and MIME type of the message part carrying an object matching the specified folder type or false if such a part was not identified within the message.

matchMimePartToHeaderType() public static method

Try to determine the MIME part that carries an object matching based on the message headers.
public static matchMimePartToHeaderType ( Horde_Mime_Part $structure, Horde_Mime_Headers $headers ) : string | boolean
$structure Horde_Mime_Part A structural representation of the mime message.
$headers Horde_Mime_Headers The message headers.
return string | boolean The MIME ID of the message part carrying an object matching the message headers or false if such a part was not identified within the message.

matchMimePartToObjectType() public static method

Try to determine the MIME part that carries the object of the specified type.
public static matchMimePartToObjectType ( Horde_Mime_Part $structure, string $type ) : string | boolean
$structure Horde_Mime_Part A structural representation of the mime message.
$type string The object type.
return string | boolean The MIME ID of the message part carrying the object of the specified type or false if such a part was not identified within the message.