Class PHP_MARC_Field

Description

PHP_MARC_Field Class

Create a MARC Field object

Located in /packages/collections/lib/php-marc/php-marc.php (line 732)


	
			
Variable Summary
string $data
string $ind1
string $ind2
array $subfields
string $tagno
array $warn
Method Summary
string add_subfields (array 0)
string data ([string $data = ""])
string formatted ()
string indicator (string $ind)
bool is_control ()
void is_empty ()
Field make_clone ()
string php_marc_field (array 0)
string raw ()
void replace_with (Field $obj)
string string ()
PHP_MARC_Subfield|false subfield (string $code)
array subfields ()
void tagno ()
void update (array 0)
void warnings ()
void _croak (string $msg)
string _warn (string $msg)
Variables
string $data (line 772)

Value of field, if field is a Control field

string $ind1 (line 747)

Value of the first indicator

string $ind2 (line 752)

Value of the second indicator

bool $is_control (line 762)

Specify if the Field is a Control field

array $subfields = array() (line 757)

Array of subfields

string $tagno (line 742)

The tag name of the Field

array $warn (line 767)

Array of warnings

Methods
add_subfields (line 865)

Add subfield

Appends subfields to existing fields last, not in "correct" place

  • return: Returns warnings if issued during parse.
string add_subfields (array 0)
  • array 0: Subfield data
data (line 901)

Set/Get Data of Control field

Sets the Data if argument given, otherwise Data returned

  • return: Data of Control field if argument not given
string data ([string $data = ""])
  • string $data: Data to be set
formatted (line 1066)

Return Field formatted

Return Field as string, formatted in a similar fashion to the MARC::Record formatted() function in Perl

  • return: Formatted output of Field
string formatted ()
indicator (line 918)

Get values of indicators

  • return: Indicator value
string indicator (string $ind)
  • string $ind: Indicator number
is_control (line 933)

Check if Field is Control field

  • return: True or False
bool is_control ()
is_empty (line 1038)

Is empty

Checks if the field is empty. Criteria is that it has atleast one subfield with a set value

void is_empty ()
make_clone (line 1012)

Clone Field

  • return: Cloned Field object
Field make_clone ()
php_marc_field (line 820)

Field init function

Create a new Field object from passed arguments

  • return: Returns warnings if any issued during parse
string php_marc_field (array 0)
  • array 0: Array ( tagno, ind1, ind2, subfield_data )
raw (line 1093)

Return Field in Raw MARC

Return the Field formatted in Raw MARC for saving into MARC files

  • return: Raw MARC
string raw ()
replace_with (line 993)

Replace Field with given Field

void replace_with (Field $obj)
  • Field $obj: Field to replace with
string (line 1114)

Return Field as String

Return Field formatted as String

  • return: Formatted as String
string string ()
subfield (line 944)

Get the value of a subfield

Return of the value of the given subfield, if exists

  • return: Value of the subfield if exists, otherwise false
PHP_MARC_Subfield|false subfield (string $code)
  • string $code: Name of subfield
subfields (line 957)

Return array of subfields

  • return: Array of PHP_MARC_Subfield objects
array subfields ()
tagno (line 890)

Return Tag number of Field

void tagno ()
update (line 967)

Update Field

Update Field with given array of arguments.

void update (array 0)
  • array 0: Array of key->value pairs of data
warnings (line 805)

Return an array of warnings

void warnings ()
_croak (line 785)

Croaking function

Similar to Perl's croak function, which ends parsing and raises an user error with a descriptive message.

void _croak (string $msg)
  • string $msg: The message to display
_warn (line 797)

Fuction to issue warnings

Warnings will not be displayed unless explicitly accessed, but all warnings issued during parse will be stored

  • return: Last added warning
string _warn (string $msg)
  • string $msg: Warning

Documentation generated on Wed, 05 Mar 2008 16:47:04 -0600 by phpDocumentor 1.3.1