BiblioIsisDb Class Reference

Inheritance diagram for BiblioIsisDb:
IsisDb

List of all members.

Public Member Functions

 __construct ($schema)
 logger ($message)
 backend ($method= 'count', $args=NULL)
 read ($id, $method= 'fetch')
 entries ()
 example ()
 tag ($results, $method= 'fetch')
 has_subfields ($key)
 subfields_switch ($key, &$value)
 subfields ($name, $key, $method)
 subfields_from_to_hash ($name, $key)
 subfields_from_fetch ($name, $key)
 is_repetitive ($field, $value)
 repetition ($key, $value)
 charset (&$data)

Static Public Member Functions

static check ($schema, $section=NULL)

Public Attributes

 $fdt
 $perl
 $format
 $log

Detailed Description

Biblio::Isis implementation of IsisDb.


Constructor & Destructor Documentation

BiblioIsisDb::__construct ( schema  ) 

Constructor.

See also:
IsisDb::__construct()

Implements IsisDb.


Member Function Documentation

BiblioIsisDb::backend ( method = 'count',
args = NULL 
)

Send requests to the perl backend.

Parameters:
$method Backend method name to invoke.
$args Backend method arguments.
Returns:
Backend return value.
BiblioIsisDb::charset ( &$  data  ) 

Charset conversion.

Converts a string from the database charset to UTF-8.

Parameters:
$data String to be converted.
Returns:
String converted to UTF-8.
static BiblioIsisDb::check ( schema,
section = NULL 
) [static]

Check configuration.

See also:
IsisDb::check()

Implements IsisDb.

BiblioIsisDb::entries (  ) 

Return number of entries in the database.

See also:
IsisDb::entries()

Implements IsisDb.

BiblioIsisDb::example (  ) 

Return an example schema.

See also:
IsisDb::example()

Implements IsisDb.

BiblioIsisDb::has_subfields ( key  ) 

Checks whether a field has subfields.

Parameters:
$key Field key.
Returns:
True if has subfields, false otherwise.
BiblioIsisDb::is_repetitive ( field,
value 
)

Deals with repetition.

As Biblio::Isis always return field values as arrays, we have to check the database schema to see if we want to convert then to a single value.

Parameters:
$field Database field.
$value Data (with or without repetition).
Returns:
True if repetitive, false otherwise.
BiblioIsisDb::logger ( message  ) 

Class logger.

Parameters:
$message Log message.
BiblioIsisDb::read ( id,
method = 'fetch' 
)

Read an entry.

Parameters:
$id Record Id.
$method Database read method.
See also:
IsisDb::read()
BiblioIsisDb::repetition ( key,
value 
)

Deals with repetition.

As Biblio::Isis always return field values as arrays, we have to check the database schema to see if we want to convert then to a single value. The current implementation is just a placeholder as no conversion is done.

Parameters:
$key Database key.
$value Query field result.
Returns:
The value according to the repetition config.
BiblioIsisDb::subfields ( name,
key,
method 
)

Makes subfield substitution in a dataset.

Parameters:
$name Dataset.
$key Field key.
$method Database read method.
Returns:
Data with processed subfields.
BiblioIsisDb::subfields_from_fetch ( name,
key 
)

Subfield handling for data read by 'from_fetch' method.

Parameters:
$name Dataset.
$key Field key.
Returns:
Data with processed subfields.
BiblioIsisDb::subfields_from_to_hash ( name,
key 
)

Subfield handling for data read by 'to_hash' method. This method is not fully supported and therefore not recommended.

It does not deal very well when data has "main" fields and subfields (like "data1^adata2^bdata3") and doesn't deal with advanced configuration such as 'join_subfields'.

Parameters:
$name Dataset.
$key Field key.
Returns:
Data with processed subfields.
BiblioIsisDb::subfields_switch ( key,
&$  value 
)

Switch keys on subfields.

Parameters:
$key Field key.
$value Dataset.
BiblioIsisDb::tag ( results,
method = 'fetch' 
)

Tag results of a db query.

This function converts the keys of query result from field numbers to names.

Parameters:
$results Database query results.
$method Database read method.
Returns:
Tagged database result.

Member Data Documentation

BiblioIsisDb::$fdt

Field description table.

BiblioIsisDb::$format

Database format, derived from $schema.

BiblioIsisDb::$log

Class action log.

BiblioIsisDb::$perl

Class instance of a perl interpreter;


The documentation for this class was generated from the following file:
 All Classes Functions Variables
Generated on Mon Sep 20 13:53:31 2010 for Cinisis Database Reader by  doxygen 1.6.3