Class PelEntry

Description

Common ancestor class of all PelIfd entries.

As this class is abstract you cannot instantiate objects from it. It only serves as a common ancestor to define the methods common to all entries. The most important methods are getValue() and setValue(), both of which is abstract in this class. The descendants will give concrete implementations for them.

If you have some data coming from an image (some raw bytes), then the static method newFromData() is helpful --- it will look at the data and give you a proper decendent of PelEntry back.

If you instead want to have an entry for some data which take the form of an integer, a string, a byte, or some other PHP type, then don't use this class. You should instead create an object of the right subclass (PelEntryShort for short integers, PelEntryAscii for strings, and so on) directly.

Located in /src/PelEntry.php (line 194)


	
			
Direct descendents
Class Description
PelEntryWindowsString Class used to manipulate strings in the format Windows XP uses.
PelEntryNumber Class for holding numbers.
PelEntryAscii Class for holding a plain ASCII string.
PelEntryUndefined Class for holding data of any kind.
Variable Summary
Method Summary
string getBytes (PelByteOrder $o)
int getComponents ()
int getIfdType ()
string getText ([boolean $brief = false])
mixed getValue ()
void setIfdType (int $type)
void setValue (mixed $value)
string __toString ()
Variables
string $bytes = '' (line 218)

The bytes representing this entry.

Subclasses must either override getBytes() or, if possible, maintain this property so that it always contains a true representation of the entry.

  • access: protected
int $components (line 239)

The number of components of this entry.

  • access: protected
PelFormat $format (line 232)

The PelFormat of this entry.

  • access: protected
int $ifd_type (line 207)

Type of IFD containing this tag.

This must be one of the constants defined in PelIfd: PelIfd::IFD0 for the main image IFD, PelIfd::IFD1 for the thumbnail image IFD, PelIfd::EXIF for the Exif sub-IFD, PelIfd::GPS for the GPS sub-IFD, or PelIfd::INTEROPERABILITY for the interoperability sub-IFD.

  • access: protected
PelTag $tag (line 225)

The PelTag of this entry.

  • access: protected
Methods
getBytes (line 309)

Turn this entry into bytes.

  • return: bytes representing this entry.
string getBytes (PelByteOrder $o)
  • PelByteOrder $o: the desired byte order, which must be either Convert::LITTLE_ENDIAN or Convert::BIG_ENDIAN.

Redefined in descendants as:
getComponents (line 296)

Return the number of components of this entry.

  • return: the number of components of this entry.
int getComponents ()
getFormat (line 286)

Return the format of this entry.

  • return: the format of this entry.
PelFormat getFormat ()
getIfdType (line 261)

Return the type of IFD which holds this entry.

int getIfdType ()
getTag (line 247)

Return the tag of this entry.

  • return: the tag of this entry.
PelTag getTag ()
getText (line 326)

Get the value of this entry as text.

The value will be returned in a format suitable for presentation, e.g., rationals will be returned as 'x/y', ASCII strings will be returned as themselves etc.

  • return: the value as text.
  • abstract:
string getText ([boolean $brief = false])
  • boolean $brief: some values can be returned in a long or more brief form, and this parameter controls that.

Redefined in descendants as:
getValue (line 338)

Get the value of this entry.

The value returned will generally be the same as the one supplied to the constructor or with setValue(). For a formatted version of the value, one should use getText() instead.

  • return: the unformatted value.
  • abstract:
mixed getValue ()

Redefined in descendants as:
setIfdType (line 276)

Update the IFD type.

void setIfdType (int $type)
setValue (line 350)

Set the value of this entry.

The value should be in the same format as for the constructor.

  • abstract:
void setValue (mixed $value)
  • mixed $value: the new value.

Redefined in descendants as:
__toString (line 368)

Turn this entry into a string.

  • return: a string representation of this entry. This is mostly for debugging.
string __toString ()

Documentation generated on Thu, 05 May 2011 07:19:00 +0200 by phpDocumentor 1.4.3