aboutsummaryrefslogtreecommitdiff
path: root/lib/sfIsisImporterManager.class.php
diff options
context:
space:
mode:
authorSilvio <s1lv10@uol.com.br>2010-07-30 15:11:49 -0300
committerSilvio <s1lv10@uol.com.br>2010-07-30 15:11:49 -0300
commit3f44e99278fbbb64020ec3718a98f853b68e884c (patch)
tree766481ed6e8cd6be583f2368a5404bad09c316a7 /lib/sfIsisImporterManager.class.php
parent5d5cbdb2defded667a01c06dc3ea3caa12a5ea3f (diff)
downloadsf_isis_importer_plugin-3f44e99278fbbb64020ec3718a98f853b68e884c.tar.gz
sf_isis_importer_plugin-3f44e99278fbbb64020ec3718a98f853b68e884c.tar.bz2
Supporting database order
Diffstat (limited to 'lib/sfIsisImporterManager.class.php')
-rw-r--r--lib/sfIsisImporterManager.class.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/sfIsisImporterManager.class.php b/lib/sfIsisImporterManager.class.php
index 460c080..756de8c 100644
--- a/lib/sfIsisImporterManager.class.php
+++ b/lib/sfIsisImporterManager.class.php
@@ -7,12 +7,12 @@
class sfIsisImporterManager extends IsisConnector
{
/**
- * @var string $loglevel Log level.
+ * @var string $loglevel Log level
*/
var $loglevel = 'info';
/**
- * @var int $processed Number of processed entries.
+ * @var int $processed Number of processed entries
*/
var $processed = 0;
@@ -83,9 +83,21 @@ class sfIsisImporterManager extends IsisConnector
*/
public function databases()
{
+ $databases = array();
+
foreach (glob(sfConfig::get('sf_lib_dir') ."/cinisis/schemas/*.yaml") as $file)
{
- $databases[] = basename($file, '.yaml');
+ $database = basename($file, '.yaml');
+ $options = sfYaml::load($file);
+
+ if (isset($options['db']['order']))
+ {
+ $databases[$options['db']['order']] = $database;
+ }
+ else
+ {
+ $this->log("Database config $database has no order option, skipping.");
+ }
}
return $databases;