Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

424 lines (399 sloc) 14.57 kb
<?php
/**
* Automatically generated by running "php schema.php mailparse".
*
* You may modify the file, but re-running schema.php against this file will
* standardize the format without losing your schema changes. It does lose
* any changes that are not part of schema. Use "note" field to comment on
* schema itself, and "note" fields are not used in any code generation but
* only staying within this file.
*/
///////////////////////////////////////////////////////////////////////////////
// Preamble: C++ code inserted at beginning of ext_{name}.h
DefinePreamble(<<<CPP
CPP
);
///////////////////////////////////////////////////////////////////////////////
// Constants
//
// array (
// 'name' => name of the constant
// 'type' => type of the constant
// 'note' => additional note about this constant's schema
// )
///////////////////////////////////////////////////////////////////////////////
// Functions
//
// array (
// 'name' => name of the function
// 'desc' => description of the function's purpose
// 'flags' => attributes of the function, see base.php for possible values
// 'opt' => optimization callback function's name for compiler
// 'note' => additional note about this function's schema
// 'return' =>
// array (
// 'type' => return type, use Reference for ref return
// 'desc' => description of the return value
// )
// 'args' => arguments
// array (
// 'name' => name of the argument
// 'type' => type of the argument, use Reference for output parameter
// 'value' => default value of the argument
// 'desc' => description of the argument
// )
// )
DefineFunction(
array(
'name' => "mail",
'desc' => "Sends an email.",
'flags' => HasDocComment,
'return' => array(
'type' => Boolean,
'desc' => "Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.\n\nIt is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.",
),
'args' => array(
array(
'name' => "to",
'type' => String,
'desc' => "Receiver, or receivers of the mail.\n\nThe formatting of this string must comply with » RFC 2822. Some examples are: user@example.com user@example.com, anotheruser@example.com User <user@example.com> User <user@example.com>, Another User <anotheruser@example.com>",
),
array(
'name' => "subject",
'type' => String,
'desc' => "Subject of the email to be sent. Caution\n\nSubject must satisfy » RFC 2047.",
),
array(
'name' => "message",
'type' => String,
'desc' => "Message to be sent.\n\nEach line should be separated with a LF (\\n). Lines should not be larger than 70 characters. Caution\n\n(Windows only) When PHP is talking to a SMTP server directly, if a full stop is found on the start of a line, it is removed. To counter-act this, replace these occurrences with a double dot.",
),
array(
'name' => "additional_headers",
'type' => String,
'value' => "null_string",
'desc' => "String to be inserted at the end of the email header.\n\nThis is typically used to add extra headers (From, Cc, and Bcc). Multiple extra headers should be separated with a CRLF (\\r\\n).\n\nWhen sending mail, the mail must contain a From header. This can be set with the additional_headers parameter, or a default can be set in php.ini.\n\nFailing to do this will result in an error message similar to Warning: mail(): \"sendmail_from\" not set in php.ini or custom \"From:\" header missing. The From header sets also Return-Path under Windows.\n\nIf messages are not received, try using a LF (\\n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.",
),
array(
'name' => "additional_parameters",
'type' => String,
'value' => "null_string",
'desc' => "The additional_parameters parameter can be used to pass additional flags as command line options to the program configured to be used when sending mail, as defined by the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.\n\nThe user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users.",
),
),
));
DefineFunction(
array(
'name' => "ezmlm_hash",
'flags' => HasDocComment,
'return' => array(
'type' => Int64,
'desc' => "The hash value of addr.",
),
'args' => array(
array(
'name' => "addr",
'type' => String,
'desc' => "The email address that's being hashed.",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_create",
'desc' => "Create a MIME mail resource.",
'flags' => HasDocComment,
'return' => array(
'type' => Resource,
'desc' => "Returns a handle that can be used to parse a message.",
),
));
DefineFunction(
array(
'name' => "mailparse_msg_free",
'desc' => "Frees a MIME resource.",
'flags' => HasDocComment,
'return' => array(
'type' => Boolean,
'desc' => "Returns TRUE on success or FALSE on failure.",
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
'desc' => "A valid MIME resource allocated by mailparse_msg_create() or mailparse_msg_parse_file().",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_parse_file",
'desc' => "Parses a file. This is the optimal way of parsing a mail file that you have on disk.",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
'desc' => "Returns a MIME resource representing the structure, or FALSE on error.",
),
'args' => array(
array(
'name' => "filename",
'type' => String,
'desc' => "Path to the file holding the message. The file is opened and streamed through the parser.",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_parse",
'desc' => "Incrementally parse data into the supplied mime mail resource.\n\nThis function allow you to stream portions of a file at a time, rather than read and parse the whole thing.",
'flags' => HasDocComment,
'return' => array(
'type' => Boolean,
'desc' => "Returns TRUE on success or FALSE on failure.",
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
'desc' => "A valid MIME resource.",
),
array(
'name' => "data",
'type' => String,
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_extract_part_file",
'desc' => "Extracts/decodes a message section from the supplied filename.\n\nThe contents of the section will be decoded according to their transfer encoding - base64, quoted-printable and uuencoded text are supported.",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
'desc' => "If callbackfunc is not NULL returns TRUE on success.\n\nIf callbackfunc is set to NULL, returns the extracted section as a string.\n\nReturns FALSE on error.",
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
'desc' => "A valid MIME resource, created with mailparse_msg_create().",
),
array(
'name' => "filename",
'type' => Variant,
'desc' => "Can be a file name or a valid stream resource.",
),
array(
'name' => "callbackfunc",
'type' => Variant,
'value' => "\"\"",
'desc' => "If set, this must be either a valid callback that will be passed the extracted section, or NULL to make this function return the extracted section.\n\nIf not specified, the contents will be sent to \"stdout\".",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_extract_whole_part_file",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
'desc' => "A valid MIME resource.",
),
array(
'name' => "filename",
'type' => Variant,
),
array(
'name' => "callbackfunc",
'type' => Variant,
'value' => "\"\"",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_extract_part",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
'desc' => "No value is returned.",
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
'desc' => "A valid MIME resource.",
),
array(
'name' => "msgbody",
'type' => Variant,
),
array(
'name' => "callbackfunc",
'type' => Variant,
'value' => "\"\"",
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_get_part_data",
'flags' => HasDocComment,
'return' => array(
'type' => VariantMap,
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_get_part",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
),
array(
'name' => "mimesection",
'type' => String,
),
),
));
DefineFunction(
array(
'name' => "mailparse_msg_get_structure",
'flags' => HasDocComment,
'return' => array(
'type' => VariantMap,
),
'args' => array(
array(
'name' => "mimemail",
'type' => Resource,
),
),
));
DefineFunction(
array(
'name' => "mailparse_rfc822_parse_addresses",
'desc' => "Parses a » RFC 822 compliant recipient list, such as that found in the To: header.",
'flags' => HasDocComment,
'return' => array(
'type' => StringVec,
'desc' => "Returns an array of associative arrays with the following keys for each recipient: display The recipient name, for display purpose. If this part is not set for a recipient, this key will hold the same value as address. address The email address is_group TRUE if the recipient is a newsgroup, FALSE otherwise.",
),
'args' => array(
array(
'name' => "addresses",
'type' => String,
'desc' => "A string containing addresses, like in: Wez Furlong <wez@example.com>, doe@example.com\n\nThis string must not include the header name.",
),
),
));
DefineFunction(
array(
'name' => "mailparse_stream_encode",
'desc' => "Streams data from the source file pointer, apply encoding and write to the destination file pointer.",
'flags' => HasDocComment,
'return' => array(
'type' => Boolean,
'desc' => "Returns TRUE on success or FALSE on failure.",
),
'args' => array(
array(
'name' => "sourcefp",
'type' => Resource,
'desc' => "A valid file handle. The file is streamed through the parser.",
),
array(
'name' => "destfp",
'type' => Resource,
'desc' => "The destination file handle in which the encoded data will be written.",
),
array(
'name' => "encoding",
'type' => String,
'desc' => "One of the character encodings supported by the mbstring module.",
),
),
));
DefineFunction(
array(
'name' => "mailparse_uudecode_all",
'desc' => "Scans the data from the given file pointer and extract each embedded uuencoded file into a temporary file.",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
'desc' => "Returns an array of associative arrays listing filename information. filename Path to the temporary file name created origfilename The original filename, for uuencoded parts only The first filename entry is the message body. The next entries are the decoded uuencoded files.",
),
'args' => array(
array(
'name' => "fp",
'type' => Resource,
'desc' => "A valid file pointer.",
),
),
));
DefineFunction(
array(
'name' => "mailparse_determine_best_xfer_encoding",
'desc' => "Figures out the best way of encoding the content read from the given file pointer.",
'flags' => HasDocComment,
'return' => array(
'type' => Variant,
'desc' => "Returns one of the character encodings supported by the mbstring module.",
),
'args' => array(
array(
'name' => "fp",
'type' => Resource,
'desc' => "A valid file pointer, which must be seek-able.",
),
),
));
///////////////////////////////////////////////////////////////////////////////
// Classes
//
// BeginClass
// array (
// 'name' => name of the class
// 'desc' => description of the class's purpose
// 'flags' => attributes of the class, see base.php for possible values
// 'note' => additional note about this class's schema
// 'parent' => parent class name, if any
// 'ifaces' => array of interfaces tihs class implements
// 'bases' => extra internal and special base classes this class requires
// 'footer' => extra C++ inserted at end of class declaration
// )
//
// DefineConstant(..)
// DefineConstant(..)
// ...
// DefineFunction(..)
// DefineFunction(..)
// ...
// DefineProperty
// DefineProperty
//
// array (
// 'name' => name of the property
// 'type' => type of the property
// 'flags' => attributes of the property
// 'desc' => description of the property
// 'note' => additional note about this property's schema
// )
//
// EndClass()
Jump to Line
Something went wrong with that request. Please try again.