/MARC.php

Description

Parser for MARC records

This package is based on the PHP MARC package, originally called "php-marc", that is part of the Emilda Project (http://www.emilda.org). Christoffer Landtman generously agreed to make the "php-marc" code available under the GNU LGPL so it could be used as the basis of this PEAR package.

PHP version 5

LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Classes
Class Description
MARC The main MARC class enables you to read MARC records from a stream or string.
MARC_Record Represents a single MARC record
MARC_Field The MARC_Field class is expected to be extended to reflect the requirements of control and data fields.
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.
MARC_Subfield The MARC_Subfield class represents a single subfield in a MARC record field.
MARC_Linked_List The MARC_Linked_List class represents a linked list structure composed of MARC_Link objects.
MARC_Link The MARC_Link class represents a node in a MARC_Linked_List linked list structure.
Includes
require_once ('PEAR/ErrorStack.php') (line 46)

To-dos:

  • todo: Ensure every function has an explicit return value
Constants
MARC_DIRECTORY_ENTRY_LEN = 12 (line 78)

Length of the Directory

MARC_END_OF_FIELD = "\x1E" (line 68)

Hexadecimal value for End of Field

MARC_END_OF_RECORD = "\x1D" (line 73)

Hexadecimal value for End of Record

MARC_ERROR_EMPTY_SUBFIELD = -12 (line 114)
MARC_ERROR_FIELD_EOF = -10 (line 112)
MARC_ERROR_INVALID_DIRECTORY = -9 (line 111)
MARC_ERROR_INVALID_DIRECTORY_LENGTH = -5 (line 107)
MARC_ERROR_INVALID_DIRECTORY_OFFSET = -8 (line 110)
MARC_ERROR_INVALID_DIRECTORY_TAG = -6 (line 108)
MARC_ERROR_INVALID_DIRECTORY_TAG_LENGTH = -7 (line 109)
MARC_ERROR_INVALID_FIELD = -15 (line 117)
MARC_ERROR_INVALID_FILE = -1 (line 103)

Define error codes

MARC_ERROR_INVALID_INDICATORS = -11 (line 113)
MARC_ERROR_INVALID_INDICATOR_REQUEST = -13 (line 115)
MARC_ERROR_INVALID_MODE = -14 (line 116)
MARC_ERROR_INVALID_SOURCE = -2 (line 104)
MARC_ERROR_INVALID_SUBFIELD = -16 (line 118)
MARC_ERROR_INVALID_TERMINATOR = -3 (line 105)
MARC_ERROR_NO_DIRECTORY = -4 (line 106)
MARC_LEADER_LEN = 24 (line 83)

Length of the Leader

MARC_LINK_ADD_AFTER = 2 (line 98)

Add link after the target link in the linked list

MARC_LINK_ADD_APPEND = 0 (line 88)

Add link to the end of the linked list

MARC_LINK_ADD_BEFORE = 1 (line 93)

Add link before the target link in the linked list

MARC_SOURCE_FILE = 1 (line 53)

MARC records retrieved from a file

MARC_SOURCE_STRING = 2 (line 58)

MARC records retrieved from a binary string

MARC_SUBFIELD_INDICATOR = "\x1F" (line 63)

Hexadecimal value for Subfield indicator

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