Class PelEntryAscii

Description

Class for holding a plain ASCII string.

This class can hold a single ASCII string, and it will be used as in

  1.  $entry $ifd->getEntry(PelTag::IMAGE_DESCRIPTION);
  2.  print($entry->getValue());
  3.  $entry->setValue('This is my image.  I like it.');

Located in /src/PelEntryAscii.php (line 65)

PelEntry
   |
   --PelEntryAscii
Direct descendents
Class Description
PelEntryTime Class for holding a date and time.
PelEntryCopyright Class for holding copyright information.
Method Summary
PelEntryAscii __construct (int $tag, [string $str = ''])
string getText ([boolean $brief = false])
string getValue ()
void setValue (string $str)
Variables
Methods
Constructor __construct (line 92)

Make a new PelEntry that can hold an ASCII string.

PelEntryAscii __construct (int $tag, [string $str = ''])
  • int $tag: the tag which this entry represents. This should be one of the constants defined in PelTag, e.g., PelTag::IMAGE_DESCRIPTION, PelTag::MODEL, or any other tag with format PelFormat::ASCII.
  • string $str: the string that this entry will represent. The string must obey the same rules as the string argument to setValue, namely that it should be given without any trailing NULL character and that it must be plain 7-bit ASCII.

Redefined in descendants as:
getText (line 141)

Return the ASCII string of the entry.

This methods returns the same as getValue.

  • return: the string held, without any final NULL character. 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 with ASCII entries.

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

Redefined in descendants as:
getValue (line 125)

Return the ASCII string of the entry.

  • return: the string held, without any final NULL character. 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.

Redefined in descendants as:
setValue (line 111)

Give the entry a new ASCII value.

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

  • todo: Implement check for high bytes?
void setValue (string $str)
  • string $str: the new value of the entry. This should be given without any trailing NULL character. The string must be plain 7-bit ASCII, the string should contain no high bytes.

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

Redefined in descendants as:

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:02 +0200 by phpDocumentor 1.4.3