This commit is contained in:
Paula V. Quispe
2016-03-18 13:43:26 -04:00
parent 7b1570e21c
commit 22d7271610
2 changed files with 32 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
<?php
/**
* Description of Granular Importer
*
*/
namespace ProcessMaker\BusinessModel\Migrator;
class GranularImporter
{
protected $factory;
protected $data;
/**
* GranularImporter constructor.
*/
public function __construct()
{
$this->factory = new MigratorFactory();
}
public function import($objectList)
{
foreach ($objectList as $key => $data) {
$objClass = $this->factory->create($key);
if(is_object($objClass)) {
$migratorData = $objClass->import($data);
}
}
}
}

View File

@@ -56,7 +56,7 @@ class MigratorFactory
case 'VARIABLES':
$class = new VariablesMigrator();
break;
return $class;
}
return $class;
}
}