diff options
author | Silvio <silvio@devlet.com.br> | 2010-06-30 18:30:22 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-06-30 18:30:22 -0300 |
commit | 44e7ef315dc560cd0de34e2b680cc914ba160377 (patch) | |
tree | d3c2449d91419e086eac05cbeb0cbf47941dd951 | |
parent | c8766ec967255af09c88f2b212c0c870ea7954b5 (diff) | |
download | cinisis-44e7ef315dc560cd0de34e2b680cc914ba160377.tar.gz cinisis-44e7ef315dc560cd0de34e2b680cc914ba160377.tar.bz2 |
Renaming IsisConnector methods, adding getSubfieldList() and getValues()
-rw-r--r-- | classes/IsisConnector.php | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index eeedeb7..237d139 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -47,7 +47,7 @@ class IsisConnector { * @return * Field data. */ - public function getFields($field) { + public function getValues($field) { if (isset($this->result[$field['name']])) { return $this->result[$field['name']]; } @@ -74,6 +74,23 @@ class IsisConnector { } /** + * Get all values of a given field. + * + * @param $field + * Field array. + * + * @return + * Field data. + */ + public function getFields($field) { + for ($n = 0; $n >= count($this->result[$field['name']]); $n++) { + $values[$n] = $this->getField($field, $n); + } + + return $values; + } + + /** * Get the value of a given subfield. * * @param $field @@ -95,12 +112,32 @@ class IsisConnector { } /** + * Get all values of a given subfield. + * + * @param $field + * Field array. + * + * @param $subfield + * Subfield name. + * + * @return + * Subfield data. + */ + public function getSubfields($field, $subfield) { + for ($n = 0; $n >= count($this->result[$field['name']]); $n++) { + $values[$n] = $this->getSubfield($field, $subfield, $n); + } + + return $values; + } + + /** * Get the list of subfields from a given field. * * @param $field * Field array. */ - public function getSubfields($field) { + public function getSubfieldList($field) { if (isset($field['subfields'])) { return $field['subfields']; } |