Class MARC_Field

Description

The MARC_Field class is expected to be extended to reflect the requirements of control and data fields.

A MARC field consists of a tag name.

Located in /MARC.php (line 823)

MARC_Link
   |
   --MARC_Field
Direct descendents
Class Description
MARC_Data_Field The MARC_Data_Field class represents a single field in a MARC record.
MARC_Control_Field The MARC_Control_Field class represents a single control field in a MARC record.
Variable Summary
string $_tag
Method Summary
string __construct (string $tag, [string $subfields = null], [string $ind1 = null], [string $ind2 = null])
void __destruct ()
string getTag ()
bool isEmpty ()
string setTag (string $tag)
bool toRaw ()
string __toString ()
Variables
string $_tag (line 830)

The tag name of the Field

  • access: protected

Inherited Variables

Inherited from MARC_Link

MARC_Link::$_next
MARC_Link::$_previous
MARC_Link::$_stack
Methods
Constructor __construct (line 847)

MARC_Field constructor

Create a new MARC_Field object from passed arguments. We have to define placeholders for the arguments required by child classes.

  • return: Returns warnings, if any, issued during parse
string __construct (string $tag, [string $subfields = null], [string $ind1 = null], [string $ind2 = null])
  • string $tag: tag
  • string $subfields: placeholder for subfields or control data
  • string $ind1: placeholder for first indicator
  • string $ind2: placeholder for second indicator

Redefinition of:
MARC_Link::__construct()
MARC_Link constructor

Redefined in descendants as:
Destructor __destruct (line 864)

Destroys the data field

void __destruct ()

Redefinition of:
MARC_Link::__destruct()
Removes link from the list, adjusting the next and previous links accordingly

Redefined in descendants as:
getTag (line 878)

Returns the tag for this MARC_Field object

  • return: returns the tag number of the field
string getTag ()
isEmpty (line 906)

Is empty

Checks if the field is empty.

  • return: Returns true if the field is empty, otherwise false
bool isEmpty ()

Redefined in descendants as:
setTag (line 891)

Sets the tag for this MARC_Field object

  • return: returns the tag number of the field
string setTag (string $tag)
  • string $tag: new value for the tag
toRaw (line 943)

Return field in raw MARC format (stub)

Return the field formatted in raw MARC for saving into MARC files. This stub method will be extended by the child classes.

  • return: Raw MARC
bool toRaw ()

Redefined in descendants as:
__toString (line 928)

Return Field formatted

Return Field as a formatted string.

  • return: Formatted output of Field
string __toString ()

Redefined in descendants as:

Inherited Methods

Inherited From MARC_Link

MARC_Link::__construct()
MARC_Link::getErrors()
MARC_Link::next()
MARC_Link::previous()
MARC_Link::setNext()
MARC_Link::setPrevious()
MARC_Link::__destruct()

Documentation generated on Mon, 14 Aug 2006 18:59:29 -0400 by phpDocumentor 1.3.0RC6