Abstract Class PelEntry

Description

Located in /PelEntry.php (line 126)


	
			
Direct descendents
Class Description
Abstract class PelEntryNumber Class for holding numbers.
 class PelEntryUndefined Class for holding data of any kind.
 class PelEntryAscii Class for holding a plain ASCII string.
Variable Summary
Method Summary
 string getBytes (PelByteOrder $o)
 int getComponents ()
 string getText ([boolean $brief = false])
 mixed getValue ()
 PelEntry newFromData (PelTag $tag, PelFormat $format, int $components, PelDataWindow $data)
 void setValue (mixed $value)
 string __toString ()
Variables
string $bytes = '' (line 137)

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

The number of components of this entry.

  • access: protected
PelFormat $format (line 151)

The PelFormat of this entry.

  • access: protected
PelTag $tag (line 144)

The PelTag of this entry.

  • access: protected
Methods
getBytes (line 354)

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

Return the number of components of this entry.

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

Return the format of this entry.

  • return: the format of this entry.
PelFormat getFormat ()
getTag (line 321)

Return the tag of this entry.

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

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

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:
newFromData (line 186)

Make a new entry from a bunch of bytes.

This factory method will create the proper subclass of PelEntry corresponding to the PelTag and PelFormat given.

A PelUnexpectedFormatException is thrown if a mismatch is discovered between the tag and format, and likewise a PelWrongComponentCountException is thrown if the number of components does not match the requirements of the tag. The requirements for a given tag (if any) can be found in the documentation for PelTag.

  • return: a newly created entry, holding the data given.
  • static:
PelEntry newFromData (PelTag $tag, PelFormat $format, int $components, PelDataWindow $data)
  • PelTag $tag: the tag of the entry.
  • PelFormat $format: the format of the entry.
  • int $components: the components in the entry.
  • PelDataWindow $data: the data which will be used to construct the entry.
setValue (line 395)

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

Turn this entry into a string.

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

SourceForge.net Logo Documentation generated on Fri, 18 Feb 2005 01:43:11 +0100 by phpDocumentor 1.3.0RC3