mailparse-stubs.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?php
  2. /**
  3. * @link http://php.net/manual/en/mailparse.constants.php
  4. */
  5. define('MAILPARSE_EXTRACT_OUTPUT', 0);
  6. /**
  7. * @link http://php.net/manual/en/mailparse.constants.php
  8. */
  9. define('MAILPARSE_EXTRACT_STREAM', 1);
  10. /**
  11. * @link http://php.net/manual/en/mailparse.constants.php
  12. */
  13. define('MAILPARSE_EXTRACT_RETURN', 2);
  14. /**
  15. * Parses a file. This is the optimal way of parsing a mail file that you have on
  16. * disk.
  17. *
  18. * @link http://php.net/manual/en/functions.mailparse-msg-parse-file.php
  19. *
  20. * @param string $filename Path to the file holding the message. The file is opened
  21. * and streamed through the parser
  22. *
  23. * @return resource Returns a MIME resource representing the structure, or false on error
  24. */
  25. function mailparse_msg_parse_file($filename)
  26. {
  27. }
  28. /**
  29. * .
  30. *
  31. * @link http://php.net/manual/en/functions.mailparse-msg-get-part.php
  32. *
  33. * @param resource $mimemail A valid MIME resource
  34. * @param string $mimesection
  35. *
  36. * @return resource
  37. */
  38. function mailparse_msg_get_part($mimemail, $mimesection)
  39. {
  40. }
  41. /**
  42. * .
  43. *
  44. * @link http://php.net/manual/en/functions.mailparse-msg-get-structure.php
  45. *
  46. * @param resource $mimemail A valid MIME resource
  47. *
  48. * @return array
  49. */
  50. function mailparse_msg_get_structure($mimemail)
  51. {
  52. }
  53. /**
  54. * .
  55. *
  56. * @link http://php.net/manual/en/functions.mailparse-msg-get-part-data.php
  57. *
  58. * @param resource $mimemail A valid MIME resource
  59. *
  60. * @return array
  61. */
  62. function mailparse_msg_get_part_data($mimemail)
  63. {
  64. }
  65. /**
  66. * .
  67. *
  68. * @link http://php.net/manual/en/functions.mailparse-msg-extract-part.php
  69. *
  70. * @param resource $mimemail A valid MIME resource
  71. * @param string $msgbody
  72. * @param callable $callbackfunc
  73. *
  74. * @return void
  75. */
  76. function mailparse_msg_extract_part($mimemail, $msgbody, $callbackfunc)
  77. {
  78. }
  79. /**
  80. * Extracts/decodes a message section from the supplied filename.
  81. *
  82. * @link http://php.net/manual/en/functions.mailparse-msg-extract-part-file.php
  83. *
  84. * @param resource $mimemail A valid MIME resource, created with
  85. * mailparse_msg_create
  86. * @param mixed $filename Can be a file name or a valid stream resource
  87. * @param callable $callbackfunc If set, this must be either a valid callback that
  88. * will be passed the extracted section, or null to make this function return the
  89. * extracted section
  90. *
  91. * @return string If $callbackfunc is not null returns true on success
  92. */
  93. function mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc = false)
  94. {
  95. }
  96. /**
  97. * .
  98. *
  99. * @link http://php.net/manual/en/functions.mailparse-msg-extract-whole-part-file.php
  100. *
  101. * @param resource $mimemail A valid MIME resource
  102. * @param string $filename
  103. * @param callable $callbackfunc
  104. *
  105. * @return string
  106. */
  107. function mailparse_msg_extract_whole_part_file($mimemail, $filename, $callbackfunc)
  108. {
  109. }
  110. /**
  111. * Create a MIME mail resource.
  112. *
  113. * @link http://php.net/manual/en/functions.mailparse-msg-create.php
  114. * @return resource Returns a handle that can be used to parse a message
  115. */
  116. function mailparse_msg_create()
  117. {
  118. }
  119. /**
  120. * Frees a MIME resource.
  121. *
  122. * @link http://php.net/manual/en/functions.mailparse-msg-free.php
  123. *
  124. * @param resource $mimemail A valid MIME resource allocated by
  125. * mailparse_msg_create or mailparse_msg_parse_file
  126. *
  127. * @return bool
  128. */
  129. function mailparse_msg_free($mimemail)
  130. {
  131. }
  132. /**
  133. * Incrementally parse data into the supplied mime mail resource.
  134. *
  135. * @link http://php.net/manual/en/functions.mailparse-msg-parse.php
  136. *
  137. * @param resource $mimemail A valid MIME resource
  138. * @param string $data
  139. *
  140. * @return bool
  141. */
  142. function mailparse_msg_parse($mimemail, $data)
  143. {
  144. }
  145. /**
  146. * Parses a RFC 822 compliant recipient list, such as that found in the To: header.
  147. *
  148. * @link http://php.net/manual/en/functions.mailparse-rfc822-parse-addresses.php
  149. *
  150. * @param string $addresses A string containing addresses, like in: Wez Furlong
  151. * wez@example.com, doe@example.com
  152. *
  153. * @return array Returns an array of associative arrays with the following keys for each
  154. * recipient: display The recipient name, for display purpose. If this part is not
  155. * set for a recipient, this key will hold the same value as address. address The
  156. * email address is_group true if the recipient is a newsgroup, false otherwise
  157. */
  158. function mailparse_rfc822_parse_addresses($addresses)
  159. {
  160. }
  161. /**
  162. * Figures out the best way of encoding the content read from the given file
  163. * pointer.
  164. *
  165. * @link http://php.net/manual/en/functions.mailparse-determine-best-xfer-encoding.php
  166. *
  167. * @param resource $fp A valid file pointer, which must be seek-able
  168. *
  169. * @return string Returns one of the character encodings supported by the mbstring module
  170. */
  171. function mailparse_determine_best_xfer_encoding($fp)
  172. {
  173. }
  174. /**
  175. * Streams data from the source file pointer, apply $encoding and write to the
  176. * destination file pointer.
  177. *
  178. * @link http://php.net/manual/en/functions.mailparse-stream-encode.php
  179. *
  180. * @param resource $sourcefp A valid file handle. The file is streamed through the
  181. * parser
  182. * @param resource $destfp The destination file handle in which the encoded data
  183. * will be written
  184. * @param string $encoding One of the character encodings supported by the mbstring
  185. * module
  186. *
  187. * @return bool
  188. */
  189. function mailparse_stream_encode($sourcefp, $destfp, $encoding)
  190. {
  191. }
  192. /**
  193. * Scans the data from the given file pointer and extract each embedded uuencoded
  194. * file into a temporary file.
  195. *
  196. * @link http://php.net/manual/en/functions.mailparse-uudecode-all.php
  197. *
  198. * @param resource $fp A valid file pointer
  199. *
  200. * @return array Returns an array of associative arrays listing filename information.
  201. * filename Path to the temporary file name created origfilename The original
  202. * filename, for uuencoded parts only The first filename entry is the message body.
  203. * The next entries are the decoded uuencoded files
  204. */
  205. function mailparse_uudecode_all($fp)
  206. {
  207. }
  208. /**
  209. * @return
  210. */
  211. function mailparse_test()
  212. {
  213. }
  214. class mimemessage
  215. {
  216. /**
  217. * @return
  218. */
  219. public function mimemessage()
  220. {
  221. }
  222. /**
  223. * @return
  224. */
  225. public function get_child()
  226. {
  227. }
  228. /**
  229. * @return
  230. */
  231. public function get_child_count()
  232. {
  233. }
  234. /**
  235. * @return
  236. */
  237. public function get_parent()
  238. {
  239. }
  240. /**
  241. * @return
  242. */
  243. public function extract_headers()
  244. {
  245. }
  246. /**
  247. * @return
  248. */
  249. public function extract_body()
  250. {
  251. }
  252. /**
  253. * @return
  254. */
  255. public function enum_uue()
  256. {
  257. }
  258. /**
  259. * @return
  260. */
  261. public function extract_uue()
  262. {
  263. }
  264. /**
  265. * @return
  266. */
  267. public function remove()
  268. {
  269. }
  270. /**
  271. * @return
  272. */
  273. public function add_child()
  274. {
  275. }
  276. }