PHP Class Apple_Push_API\MIME_Builder

Afficher le fichier Open project: alleyinteractive/apple-news Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
add_content_from_file ( string $filepath, string $name = null ) : string Add file contents to the MIME request.
add_json_string ( string $name, string $filename, string $content ) : string Add a JSON string to the MIME request.
add_metadata ( mixed $meta ) : string Add metadata to the MIME request.
boundary ( ) : string Get the boundary.
close ( ) : string Close a file added to the MIME request.
get_debug_content ( array $args ) : string Gets the debug version of the MIME content

Private Methods

Méthode Description
build_attachment ( string $name, string $filename, string $content, string $mime_type, integer $size ) : string Build an attachment in the MIME request.
get_mime_type_for ( string $filepath ) : string Get the MIME type for a file.
is_valid_mime_type ( string $type ) : boolean Check if this file is a valid MIME type to be included in the bundle.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

add_content_from_file() public méthode

Add file contents to the MIME request.
public add_content_from_file ( string $filepath, string $name = null ) : string
$filepath string
$name string
Résultat string

add_json_string() public méthode

Add a JSON string to the MIME request.
public add_json_string ( string $name, string $filename, string $content ) : string
$name string
$filename string
$content string
Résultat string

add_metadata() public méthode

Add metadata to the MIME request.
public add_metadata ( mixed $meta ) : string
$meta mixed
Résultat string

boundary() public méthode

Get the boundary.
public boundary ( ) : string
Résultat string

close() public méthode

Close a file added to the MIME request.
public close ( ) : string
Résultat string

get_debug_content() public méthode

Gets the debug version of the MIME content
public get_debug_content ( array $args ) : string
$args array
Résultat string