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.  $title $ifd->getEntry(PelTag::XP_TITLE);
  2.  print($title->getValue());
  3.  $title->setValue('My favorite cat');
or if no entry is present one can add a new one with
  1.  $title new PelEntryWindowsString(PelTag::XP_TITLE'A cute dog.');
  2.  $ifd->addEntry($title);

Located in /src/PelEntryByte.php (line 195)

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 222)

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

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

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 258)

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 238)

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 Thu, 05 May 2011 07:19:03 +0200 by phpDocumentor 1.4.3