Class PelEntryWindowsString

Description

Class used to manipulate strings in the format Windows XP uses.

When examining the file properties of an image in Windows XP one can fill in title, comment, author, keyword, and subject fields. Filling those fields and pressing OK will result in the data being written into the Exif data in the image.

The data is written in a non-standard format and can thus not be loaded directly --- this class is needed to translate it into normal strings.

It is important that entries from this class are only created with the PelTag::XP_TITLE, PelTag::XP_COMMENT, PelTag::XP_AUTHOR, PelTag::XP_KEYWORD, and PelTag::XP_SUBJECT tags. If another tag is used the data will no longer be correctly decoded when reloaded with PEL. (The data will be loaded as an PelEntryByte entry, which isn't as useful.)

This class is to be used as in

  1.  $entry $ifd->getEntry(PelTag::XP_TITLE);
  2.  print($entry->getValue());
  3.  $entry->setValue('My favorite cat');

Located in /PelEntryByte.php (line 190)

PelEntry
   |
   --PelEntryWindowsString
Method Summary
 PelEntryWindowsString __construct (int $tag, [string $str = ''])
 string getText ([boolean $brief = false])
 string getValue ()
 void setValue (string $str)
Variables
Methods
Constructor __construct (line 217)

Make a new PelEntry that can hold a Windows XP specific string.

PelEntryWindowsString __construct (int $tag, [string $str = ''])
getText (line 269)

Return the string of the entry.

This methods returns the same as getValue.

  • return: the string held, without any extra NULL characters. The string will be the same as the one given to setValue or to the constructor.
string getText ([boolean $brief = false])
  • boolean $brief: not used.

Redefinition of:
PelEntry::getText()
Get the value of this entry as text.
getValue (line 253)

Return the string of the entry.

  • return: the string held, without any extra NULL characters. The string will be the same as the one given to setValue or to the constructor.
string getValue ()

Redefinition of:
PelEntry::getValue()
Get the value of this entry.
setValue (line 233)

Give the entry a new value.

This will overwrite the previous value. The value can be retrieved later with the getValue method.

void setValue (string $str)
  • string $str: the new value of the entry. This should be use the Latin-1 encoding and be given without any extra NULL characters.

Redefinition of:
PelEntry::setValue()
Set the value of this entry.

Inherited Methods

Inherited From PelEntry

 PelEntry::getBytes()
 PelEntry::getComponents()
 PelEntry::getFormat()
 PelEntry::getIfdType()
 PelEntry::getTag()
 PelEntry::getText()
 PelEntry::getValue()
 PelEntry::setIfdType()
 PelEntry::setValue()
 PelEntry::__toString()

Documentation generated on Tue, 19 Dec 2006 01:08:19 +0100 by phpDocumentor 1.3.0 SourceForge.net Logo