diff options
Diffstat (limited to 'lib/sfIsisImporterEntities.class.php')
-rw-r--r-- | lib/sfIsisImporterEntities.class.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lib/sfIsisImporterEntities.class.php b/lib/sfIsisImporterEntities.class.php index cd66afd..73fe3af 100644 --- a/lib/sfIsisImporterEntities.class.php +++ b/lib/sfIsisImporterEntities.class.php @@ -4,7 +4,14 @@ * IsisImporterEntities: provides ISIS import methods for importing data * into model entities. */ -class sfIsisImporterEntities extends IsisConnector { +class sfIsisImporterEntities { + /** + * Constructor. + */ + public function __construct($isis) { + $this->isis = $isis; + } + /** * Get the entity name from a subfield. * @@ -25,11 +32,11 @@ class sfIsisImporterEntities extends IsisConnector { */ public function addMain(&$model, $field, $row = 0) { - $value = $this->filterBrackets($this->getMainItem($field, $row)); + $value = $this->isis->filterBrackets($this->isis->getMainItem($field, $row)); if ($value != null) { - $map = $this->getMap($field); + $map = $this->isis->getMap($field); $model->{$map}($value); } } @@ -44,11 +51,11 @@ class sfIsisImporterEntities extends IsisConnector { */ public function addSubfield(&$model, $field, $subfield, $row = 0) { - $value = $this->filterBrackets($this->getSubfield($field, $subfield, $row)); + $value = $this->isis->filterBrackets($this->isis->getSubfield($field, $subfield, $row)); if ($value != null) { - $map = $this->getMap($field, $subfield); + $map = $this->isis->getMap($field, $subfield); $model->{$map}($value); } } @@ -62,7 +69,7 @@ class sfIsisImporterEntities extends IsisConnector { */ public function addSubfields(&$model, $field, $row = 0) { - foreach ($this->getSubfieldList($field) as $subfield) + foreach ($this->isis->getSubfieldList($field) as $subfield) { $this->addSubfield($model, $field, $subfield, $row); } @@ -85,14 +92,14 @@ class sfIsisImporterEntities extends IsisConnector { */ public function importValues(&$model, array $field) { - if ($this->fieldHasMap($field)) + if ($this->isis->fieldHasMap($field)) { $this->addMain($model, $field); } - foreach ($this->getSubfieldList($field) as $subfield) + foreach ($this->isis->getSubfieldList($field) as $subfield) { - if ($this->subfieldHasMap($field, $subfield)) + if ($this->isis->subfieldHasMap($field, $subfield)) { $this->addSubfield($model, $field, $subfield); } |