diff options
author | Silvio <silvio@devlet.com.br> | 2010-07-13 18:29:23 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-07-13 18:29:23 -0300 |
commit | 1457718f111ea45705555439e6a732e293cc7bef (patch) | |
tree | 9b74b105c0497f58229bd8b0a477749d2d14bb1f /classes | |
parent | e66cda93a6bb085aacf9ae90d74d7084378672b6 (diff) | |
download | cinisis-1457718f111ea45705555439e6a732e293cc7bef.tar.gz cinisis-1457718f111ea45705555439e6a732e293cc7bef.tar.bz2 |
Adding hasFieldSubfieldCondition() on IsisConnector
Diffstat (limited to 'classes')
-rw-r--r-- | classes/IsisConnector.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index 710048a..cc4bf62 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -514,4 +514,33 @@ class IsisConnector { public function getSubfieldName($field_key, $subfield_key) { return $this->format['fields'][$field_key]['subfields'][$subfield_key]; } + + /** + * Check if a field and subfield match a given condition. + * + * @param $field + * Field data. + * + * @param $subfield + * Subfield. + * + * @param $key + * Field key. + * + * @param $subkey + * Subfield key. + * + * @return + * True if condition match, false otherwise. + */ + public function hasFieldSubfieldCondition($field, $subfield, $key, $subkey) { + $field_key = $this->getFieldKey($field); + $subdield_key = $this->getSubfieldKey($field, $subfield); + if ($field_key == $key && $subfield_key == $subkey) + { + return true; + } + + return false; + } } |