Moodle  2.2.1
http://www.collinsharper.com
SimpleAttachment Class Reference

Public Member Functions

 SimpleAttachment ($key, $content, $filename)
 asRequest ()
 asMime ()
 _deduceMimeType ()
 _isOnlyAscii ($ascii)
 isKey ($key)
 getKey ()
 getValue ()

Data Fields

 $_key
 $_content
 $_filename

Detailed Description

Definition at line 89 of file encoding.php.


Member Function Documentation

Attempts to figure out the MIME type from the file extension and the content.

Returns:
string MIME type. private

Definition at line 135 of file encoding.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_isOnlyAscii ( ascii)

Tests each character is in the range 0-127.

Parameters:
string$asciiString to test. private

Definition at line 147 of file encoding.php.

Here is the caller graph for this function:

asMime ( )

The MIME part as a string.

Returns:
string MIME part encoding. public

Definition at line 120 of file encoding.php.

Here is the call graph for this function:

asRequest ( )

The pair as a single string.

Returns:
string Encoded pair. public

Definition at line 111 of file encoding.php.

getKey ( )

Is this the value we are looking for?

Returns:
string Identifier. public

Definition at line 171 of file encoding.php.

getValue ( )

Is this the value we are looking for?

Returns:
string Content. public

Definition at line 180 of file encoding.php.

isKey ( key)

Is this the value we are looking for?

Parameters:
string$keyIdentifier.
Returns:
boolean True if matched. public

Definition at line 162 of file encoding.php.

SimpleAttachment ( key,
content,
filename 
)

Stashes the data for rendering later.

Parameters:
string$keyKey to add value to.
string$contentRaw data.
hash$filenameOriginal filename.

Definition at line 100 of file encoding.php.


Field Documentation

$_content

Definition at line 91 of file encoding.php.

$_filename

Definition at line 92 of file encoding.php.

$_key

Definition at line 90 of file encoding.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations