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

Class: File_MARC_Field

Source Location: /File_MARC-1.4.1/File/MARC/Field.php

Class Overview

SplDoublyLinkedList
   |
   --File_MARC_List
      |
      --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: File_MARC_List

File_MARC_List::appendNode()
Adds a node onto the linked list.
File_MARC_List::deleteNode()
Deletes a node from the linked list.
File_MARC_List::getPosition()
Return position of the subfield
File_MARC_List::insertNode()
Inserts a node into the linked list, based on a reference node that already exists in the list.
File_MARC_List::key()
Returns the tag for a File_MARC_Field object, or the code for a File_MARC_Subfield object.
File_MARC_List::prependNode()
Adds a node to the start of the linked list.
File_MARC_List::setPosition()
Sets position of the subfield

Class Details

[line 55]
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 63]

The tag name of the Field
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 78]

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 95]

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 ]

formatField   [line 223]

string formatField( [array $exclude = array('2')])

Pretty print a MARC_Field object without tags, indicators, etc.
  • Return: Returns the formatted field data

Parameters:

array   $exclude   —  Subfields to exclude from formatted output

[ Top ]

getTag   [line 107]

string getTag( )

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

[ Top ]

isControlField   [line 154]

bool isControlField( )

Is control field

Checks if the field is a control field.

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

[ Top ]

isDataField   [line 171]

bool isDataField( )

Is data field

Checks if the field is a data field.

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

[ Top ]

isEmpty   [line 136]

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 121]

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 208]

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 193]

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 Wed, 13 Nov 2019 12:37:08 -0500 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.