Class PelEntryCopyright

Description

Class for holding copyright information.

The Exif standard specifies a certain format for copyright information where the one copyright tag holds both the photographer and editor copyrights, separated by a NULL character.

This class is used to manipulate that tag so that the format is kept to the standard. A common use would be to add a new copyright tag to an image, since most cameras do not add this tag themselves. This would be done like this:

  1.  $entry new PelEntryCopyright('Copyright, Martin Geisler, 2004');
  2.  $ifd0->addEntry($entry);

Here we only set the photographer copyright, use the optional second argument to specify the editor copyright. If there is only an editor copyright, then let the first argument be the empty string.

Located in /PelEntryAscii.php (line 374)

PelEntry
   |
   --PelEntryAscii
      |
      --PelEntryCopyright
Method Summary
 PelEntryCopyright __construct ([string $photographer = ''], [string $editor = ''])
 string getText ([boolean $brief = false])
 array getValue ()
 void setValue ([string $photographer = ''], [string $editor = ''])
Variables
Methods
Constructor __construct (line 400)

Make a new entry for holding copyright information.

PelEntryCopyright __construct ([string $photographer = ''], [string $editor = ''])
  • string $photographer: the photographer copyright. Use the empty string if there is no photographer copyright.
  • string $editor: the editor copyright. Use the empty string if there is no editor copyright.

Redefinition of:
PelEntryAscii::__construct()
Make a new PelEntry that can hold an ASCII string.
getText (line 460)

Return a text string with the copyright information.

The photographer and editor copyright fields will be returned with a '-' in between if both copyright fields are present, otherwise only one of them will be returned.

  • return: the copyright information in a string.
string getText ([boolean $brief = false])
  • boolean $brief: if false, then the strings '(Photographer)' and '(Editor)' will be appended to the photographer and editor copyright fields (if present), otherwise the fields will be returned as is.

Redefinition of:
PelEntryAscii::getText()
Return the ASCII string of the entry.
getValue (line 441)

Retrive the copyright information.

The strings returned will be the same as the one used previously with either the constructor or with setValue.

  • return: an array with two strings, the photographer and editor copyrights. The two fields will be returned in that order, so that the first array index will be the photographer copyright, and the second will be the editor copyright.
array getValue ()

Redefinition of:
PelEntryAscii::getValue()
Return the ASCII string of the entry.
setValue (line 415)

Update the copyright information.

void setValue ([string $photographer = ''], [string $editor = ''])
  • string $photographer: the photographer copyright. Use the empty string if there is no photographer copyright.
  • string $editor: the editor copyright. Use the empty string if there is no editor copyright.

Redefinition of:
PelEntryAscii::setValue()
Give the entry a new ASCII value.

Inherited Methods

Inherited From PelEntryAscii

 PelEntryAscii::__construct()
 PelEntryAscii::getText()
 PelEntryAscii::getValue()
 PelEntryAscii::setValue()

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