IsisMap Class Reference
List of all members.
Detailed Description
Provides mappings and schema functionalities around Cinisis.
Member Function Documentation
IsisMap::fieldHasMap |
( |
$ |
field |
) |
|
Check on an ISIS schema whether a field has a map.
- Parameters:
-
- Returns:
- TRUE if field has a map, FALSE otherwise.
IsisMap::getAttributes |
( |
$ |
field, |
|
|
$ |
subfield = null | |
|
) |
| | |
Get attributes based on field and subfield.
- Parameters:
-
| $field | Field data from ISIS database schema. |
| $subfield | Subfield name. |
- Returns:
- Attributes.
IsisMap::getDeniedCombinations |
( |
$ |
field |
) |
|
Defines the denied field combinations.
- Parameters:
-
| $field | Field data from ISIS database schema. |
- Returns:
- Denied field combinations.
Sample denied combination.
$sample = array( 0 => array('a', 'b', 'c'), // a AND b AND c OR 1 => array('a', 'c', '!d'), // a AND b BUT WITHOUT d OR 2 => array('a', 'b', '*'), // a AND b AND any other item OR 3 => array('*2'), // ANY two items together OR 4 => array('main', '*'), // main AND ANY other item OR );
IsisMap::getFieldArray |
( |
$ |
field_key |
) |
|
Get the array which defines a field.
- Parameters:
-
- Returns:
- Field array.
IsisMap::getFieldKey |
( |
$ |
field |
) |
|
Get the key of a field entry.
- Parameters:
-
- Returns:
- Field key.
IsisMap::getFieldName |
( |
$ |
field_key |
) |
|
Get a field name.
- Parameters:
-
- Returns:
- Field name.
IsisMap::getFieldNames |
( |
|
) |
|
Get all field names.
- Returns:
- Array with field names.
IsisMap::getFullMap |
( |
$ |
field |
) |
|
Get the full map.
- Parameters:
-
- Returns:
- Array with full map or false if there is no map.
IsisMap::getItemKey |
( |
$ |
field, |
|
|
$ |
item | |
|
) |
| | |
Get the item key.
- Parameters:
-
| $field | Field array. |
| $item | Item name. |
- Returns:
- Item key.
IsisMap::getMainItemName |
( |
$ |
field |
) |
|
Get the main field name.
- Parameters:
-
| $field | Field data from ISIS database schema. |
- Returns:
- Main field name.
IsisMap::getMap |
( |
$ |
field, |
|
|
$ |
subfield = NULL | |
|
) |
| | |
Determine which model field an ISIS db field should be mapped to. When importing an ISIS database to another system, a mapping provided in the database schema can be used to put the originating entries (fields and subfields) in the right place at the destination database.
Map format:
map: type: relation
map: type: value field: dest subfields: a: dest b: dest
Examples:
map: type: Performer
map: type: value field: title subfields: a: subtitle
- Parameters:
-
| $field | Field array. |
| $subfield | Subfield name. |
- Returns:
- A map destination to the field or subfield.
IsisMap::getMapType |
( |
$ |
field |
) |
|
Get the mapping type of a given field.
- Parameters:
-
- Returns:
- The mapping type.
IsisMap::getSubfieldKey |
( |
$ |
field, |
|
|
$ |
subfield | |
|
) |
| | |
Get the key of a subfield entry.
- Parameters:
-
| $field | Field array. |
| $subfield | Subfield name. |
- Returns:
- Subfield key.
IsisMap::getSubfieldList |
( |
$ |
field |
) |
|
Get the list of subfields from a given field.
- Parameters:
-
IsisMap::getSubfieldName |
( |
$ |
field, |
|
|
$ |
subfield_key, |
|
|
$ |
by_key = FALSE | |
|
) |
| | |
Get a subfield name.
- Parameters:
-
| $field | Field name or key. |
| $subfield_key | Subfield key. |
| $by_key | Set to true if you're passing the field key instead of it's name. |
- Returns:
- Subfield name.
IsisMap::getSubfieldNames |
( |
$ |
field_key |
) |
|
Get all subfield names.
- Parameters:
-
- Returns:
- Array with subfield names.
static IsisMap::mapName |
( |
$ |
name |
) |
[static] |
Build a map name.
- Parameters:
-
- Returns:
- Map name
static IsisMap::methodName |
( |
$ |
type |
) |
[static] |
Guess a method name from a type.
- Parameters:
-
- Returns:
- Method name.
static IsisMap::normalizeFieldName |
( |
$ |
name |
) |
[static] |
Normalize field names.
- Parameters:
-
- Returns:
- Normalized field name
IsisMap::subfieldHasMap |
( |
$ |
field, |
|
|
$ |
subfield | |
|
) |
| | |
Check on an ISIS schema whether a subfield has a map.
- Parameters:
-
| $field | Field array. |
| $subfield | Subfield name. |
- Returns:
- TRUE if subfield has a map, FALSE otherwise.
The documentation for this class was generated from the following file: