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

Class: File_MARCBASE

Source Location: /File_MARC-1.4.1/File/MARCBASE.php

Class Overview


The main File_MARCBASE class provides common methods for File_MARC and File_MARCXML - primarily for generating MARCXML output.


Author(s):

Variables

Methods


Child classes:

File_MARC
The main File_MARC class enables you to return File_MARC_Record objects from a stream or string.
File_MARCXML
The main File_MARCXML class enables you to return File_MARC_Record objects from an XML stream or string.

Inherited Variables

Inherited Methods


Class Details

[line 54]
The main File_MARCBASE class provides common methods for File_MARC and File_MARCXML - primarily for generating MARCXML output.


[ Top ]


Class Variables

$record_class =

[line 69]

Record class
  • Access: protected

Type:   string


[ Top ]

$xmlwriter =

[line 62]

XMLWriter for writing collections
  • Access: protected

Type:   XMLWriter


[ Top ]



Method Detail

__construct (Constructor)   [line 93]

File_MARCBASE __construct( string $source, int $type, string $record_class)

Read in MARCXML records

This function reads in files or strings that contain one or more MARCXML records.

  1.  <?php
  2.  // Retrieve MARC records from a file
  3.  $journals = new File_MARC('journals.mrc'SOURCE_FILE);
  4.  
  5.  // Retrieve MARC records from a string (e.g. Z39 query results)
  6.  $monographs = new File_MARC($raw_marcSOURCE_STRING);
  7.  ?>


Overridden in child classes as:

File_MARC::__construct()
Read in MARC records
File_MARCXML::__construct()
Read in MARCXML records

Parameters:

string   $source   —  Name of the file, or a raw MARC string
int   $type   —  Source of the input: SOURCE_FILE or SOURCE_STRING
string   $record_class   —  Record class, defaults to File_MARC_Record

[ Top ]

getXMLWriter   [line 131]

XMLWriter getXMLWriter( )

Returns the XMLWriter object

This method produces an XML representation of a MARC record that attempts to adhere to the MARCXML standard documented at http://www.loc.gov/standards/marcxml/

  • Return: XMLWriter instance

[ Top ]

toXMLFooter   [line 147]

string toXMLFooter( )

Returns the MARCXML collection footer

This method produces an XML representation of a MARC record that attempts to adhere to the MARCXML standard documented at http://www.loc.gov/standards/marcxml/

  • Return: representation of MARC record in MARCXML format

[ Top ]

toXMLHeader   [line 113]

bool toXMLHeader( )

Initializes the MARCXML output of a record or collection of records

This method produces an XML representation of a MARC record that attempts to adhere to the MARCXML standard documented at http://www.loc.gov/standards/marcxml/

  • Return: true if successful

[ Top ]


Documentation generated on Wed, 13 Nov 2019 12:37:08 -0500 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.