Mail_mimeDecode documentation
| From: | Louis Aslett | Date: | Tue, 18 Jun 2002 01:45:00 +0000 |
| Subject: | Mail_mimeDecode documentation | ||
| Groups: | php.pear.dev php.pear.webmaster | ||
| Request: | Send a blank email to pear-dev+get-7166@lists.php.net to get a copy of this message | ||
Hi all,
First off thanks for creating PEAR. It is a top quality resource for PHP
developers.
However, I have found what I believe to be something very confusing (wrong)
in the documentation of the Mail_mimeDecode PEAR class. To dive straight
into an example:
The documentation leads me to believe that to access, for example, the
filename of the second part of a multipart email I would access the array
member:
$result['parts'][1]['d_parameters']['filename']
after on the result of the static decode() member.
However, after some head scratching and examination of the print_r output
for $result, it turned out that it was an object containing arrays, not
actually an array itself, which is what the docs state:
array decode (array $args)
It also turned out that each of the individual multipart parts are also
objects, which lead ultimately to the correct way of accessing the filename:
$result->parts[1]->d_parameters['filename']
which is a far cry from the documented behavior!
Can you please update the docs to reflect the real state of play as I am
sure some less persistent users may not realise and give up.
Otherwise thanks and keep up the great work!
Louis Aslett