From cf0c2004051d538b0bd6105567b3af4a87913e52 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 20 Jul 2010 16:19:06 -0300 Subject: New method explodeItem() at IsisConnector --- classes/IsisConnector.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'classes/IsisConnector.php') diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index c82d479..ff057c6 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -196,7 +196,7 @@ class IsisConnector { * @return * Item data. */ - public function getItem($field, $item, $row) { + public function getItem($field, $item, $row = 0) { $main_field = $this->getMainItemName($field); if ($field == $main_field) { @@ -517,6 +517,25 @@ class IsisConnector { return array_filter($this->explodeValue($this->getSubfield($field, $subfield, $row))); } + /** + * Explode brackets for a given item, avoiding null entries. + * + * @param $field + * Field data. + * + * @param $item + * Item. + * + * @param $row + * Row number. + * + * @return + * Exploded item data. + */ + public function explodeItem($field, $item, $row) { + return array_filter($this->explodeValue($this->getItem($field, $item, $row))); + } + /** * Filter brackets for a given subfield. * -- cgit v1.2.3