File_MARC
[ class tree: File_MARC ] [ index: File_MARC ] [ all elements ]

Class: File_MARC_Field

Source Location: /File_MARC-0.2.3/MARC/Field.php

Class Overview

Structures_LinkedList_DoubleNode
   |
   --File_MARC_Field

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


Author(s):

Variables

Methods


Child classes:

File_MARC_Data_Field
The File_MARC_Data_Field class represents a single field in a MARC record.
File_MARC_Control_Field
The File_MARC_Control_Field class represents a single control field in a MARC record.

Inherited Variables

Inherited Methods


Class Details

[line 53]
The File_MARC_Field class is expected to be extended to reflect the requirements of control and data fields.

Every MARC field contains a tag name.



[ Top ]


Class Variables

$tag =

[line 61]

The tag name of the Field
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 76]

File_MARC_Field __construct( string $tag, [string $subfields = null], [string $ind1 = null], [string $ind2 = null])

File_MARC_Field constructor

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


Overridden in child classes as:

File_MARC_Data_Field::__construct()
File_MARC_Data_Field constructor
File_MARC_Control_Field::__construct()
Field init function

Parameters:

string   $tag   —  tag
string   $subfields   —  placeholder for subfields or control data
string   $ind1   —  placeholder for first indicator
string   $ind2   —  placeholder for second indicator

[ Top ]

__destruct (Destructor)   [line 93]

void __destruct( )

Destroys the data field

Overridden in child classes as:

File_MARC_Data_Field::__destruct()
Destroys the data field
File_MARC_Control_Field::__destruct()
Destroys the control field

[ Top ]

getTag   [line 106]

string getTag( )

Returns the tag for this File_MARC_Field object
  • Return: returns the tag number of the field

[ Top ]

isEmpty   [line 135]

bool isEmpty( )

Is empty

Checks if the field is empty.

  • Return: Returns true if the field is empty, otherwise false

Overridden in child classes as:

File_MARC_Data_Field::isEmpty()
Checks if the field is empty.
File_MARC_Control_Field::isEmpty()
Is empty

[ Top ]

setTag   [line 120]

string setTag( string $tag)

Sets the tag for this File_MARC_Field object
  • Return: returns the tag number of the field

Parameters:

string   $tag   —  new value for the tag

[ Top ]

toRaw   [line 172]

bool toRaw( )

Return field in raw MARC format (stub)

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

  • Return: Raw MARC

Overridden in child classes as:

File_MARC_Data_Field::toRaw()
Return Field in Raw MARC
File_MARC_Control_Field::toRaw()
Return as raw MARC

[ Top ]

__toString   [line 157]

string __toString( )

Return Field formatted

Return Field as a formatted string.

  • Return: Formatted output of Field

Overridden in child classes as:

File_MARC_Data_Field::__toString()
Return Field formatted
File_MARC_Control_Field::__toString()
Return as a formatted string

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:26:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.