Support Requests item #1519618, was opened at 2006-07-09 19:16
Message generated for change (Comment added) made by mgeisler
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Install Problem
Group: None
>Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Martin Geisler (mgeisler)
Summary: Missing interfaces

Initial Comment:

I installed the PEL library and began to test it. I
wanted to use the getIterator function on a pelIfd
object but I got errors on the $tag object that should
have been issued. I walked through the code and
discovered that pelIfd.php was implementing interfaces
at line 73: IteratorAggregate and ArrayAccess.

I cannot find anywhere those interfaces...

Could you please help me?



>Comment By: Martin Geisler (mgeisler)
Date: 2006-07-11 17:41

Logged In: YES 

Ahh... I've been trying to find out why the code didn't work
for you -- it worked fine for me.

I then re-read what you had written and now I see the
problem: you are treating $tag as a PelTag object, when it
is just a plain integer.  The getName() method in PelTag is
*static* and you should do PelTag::getName($tag) instead of

I initially designed things that way so that there wont be
an object floating around for each tag.  PelJpegMarker is
designed similarly.

But perhaps that was a mistake?  Making a bunch of extra
objects would probably make the logic easier and hopefully
the code wont run significantly slower.


Comment By: Martin Geisler (mgeisler)
Date: 2006-07-10 11:02

Logged In: YES 

Thanks for the debuggin information... I think it helps. 
I'll be the numbers you are seeing (270, ...) are tags:
IMAGE_DESCRIPTION = 0x010E = 270, MAKE = 0x10F = 271, and so on.

Why you're getting that in $tag is strange --- I'm extending
the test suite so that it exercises this code too and then I
hope to find the bug.  Please stay tuned.


Comment By: Nobody/Anonymous (nobody)
Date: 2006-07-09 21:10

Logged In: NO 

I'm using PHP 5.1.4 ...

When I make an iterator object with:

$ifd = $ifd0->getIterator();

and then loop through it with:

foreach ($ifd as $tag => $entry) {
echo($tag." : ".$entry->getText()."<br />\n");

$entry is considered like a PelEntry object but if I try to
get the name of $tag ($tagName = $tag->getName();) I get the
following error:

Fatal error: Call to a member function getName() on a
non-object in ...

As I understand, $tag should be a PelTag object, but when I
make a print_r($tag), I get only numbers (270, 271, 272,
274, 282,...)!?

Where could be the problem?

Thanks for your help...

Best regards.


Comment By: Martin Geisler (mgeisler)
Date: 2006-07-09 20:44

Logged In: YES 

They are part of the Standard PHP Library, SPL, please take
a look at

But you shouldn't have to do anything, SPL should be
included in all new PHP releases (as far as I understand it).

Please quote the exact error message you get, and please
also include some information about the version of PHP you
are using --- there has been some problems with strange bugs
in early versions of the 5.x series...


You can respond by visiting:

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
PEL-devel mailing list

Reply via email to