diff options
Diffstat (limited to 'classes/IsisMap.php')
-rw-r--r-- | classes/IsisMap.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/classes/IsisMap.php b/classes/IsisMap.php index e73e178..05c7ae9 100644 --- a/classes/IsisMap.php +++ b/classes/IsisMap.php @@ -279,6 +279,25 @@ class IsisMap extends IsisReader { } /** + * Get all subfield names. + * + * @param $field_key + * Field key. + * + * @return + * Array with subfield names. + */ + public function getSubfieldNames($field_key) { + $subfields = array(); + + foreach ($this->format['fields'][$field_key]['subfields'] as $key => $value) { + $subfields[$key] = $value; + } + + return $subfields; + } + + /** * Get a field name. * * @param $field_key @@ -290,4 +309,20 @@ class IsisMap extends IsisReader { public function getFieldName($field_key) { return $this->format['fields'][$field_key]['name']; } + + /** + * Get all field names. + * + * @return + * Array with field names. + */ + public function getFieldNames() { + $fields = array(); + + foreach ($this->format['fields'] as $key => $field) { + $fields[$key] = $field['name']; + } + + return $fields; + } } |