aboutsummaryrefslogtreecommitdiff
path: root/lib/sfIsisImporter.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sfIsisImporter.class.php')
-rw-r--r--lib/sfIsisImporter.class.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/sfIsisImporter.class.php b/lib/sfIsisImporter.class.php
index 6119d35..acdf137 100644
--- a/lib/sfIsisImporter.class.php
+++ b/lib/sfIsisImporter.class.php
@@ -21,8 +21,9 @@ class sfIsisImporter extends sfIsisImporterRelations
* Constructor.
*/
public function __construct($config = null) {
- parent::__construct($config);
- $this->stats = sfIsisImporterStats::getInstance();
+ $this->stats = sfIsisImporterStats::getInstance();
+ $this->isis = new IsisConnector($config);
+ $this->relations = new sfIsisImporterRelations($this->isis);
// Get a logger instance.
$this->logger = sfIsisImporterLog::getInstance();
@@ -92,7 +93,7 @@ class sfIsisImporter extends sfIsisImporterRelations
public function addEntry($base_model, $entry)
{
// Get data and setup the model.
- $this->read($entry);
+ $this->isis->read($entry);
$model = $this->newModel($base_model, $entry);
if ($model)
@@ -100,7 +101,7 @@ class sfIsisImporter extends sfIsisImporterRelations
$this->log("Importing $base_model $entry...");
// Dispatch to custom import procedures.
- foreach (new IsisMethodIterator($this) as $method => $field)
+ foreach (new IsisMethodIterator($this->isis, $this) as $method => $field)
{
if (!$this->hasDeniedCombinations($base_model, $field))
{
@@ -159,9 +160,9 @@ class sfIsisImporter extends sfIsisImporterRelations
*/
public function skipExisting()
{
- if (isset($this->format['import']['skip_existing']))
+ if (isset($this->isis->format['import']['skip_existing']))
{
- return $this->format['import']['skip_existing'];
+ return $this->isis->format['import']['skip_existing'];
}
return true;
@@ -212,7 +213,7 @@ class sfIsisImporter extends sfIsisImporterRelations
foreach ($combination as $item)
{
- foreach (new IsisRowIterator($this, $field) as $row)
+ foreach (new IsisRowIterator($this->isis, $field) as $row)
{
if (!$this->hasDeniedItem($field, $item, $row))
{
@@ -266,7 +267,7 @@ class sfIsisImporter extends sfIsisImporterRelations
}
// Check if the item exists.
- $has = $this->hasItem($field, $item, $row);
+ $has = $this->isis->hasItem($field, $item, $row);
if ($condition == true)
{