aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sfIsisImporterEntities.class.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sfIsisImporterEntities.class.php b/lib/sfIsisImporterEntities.class.php
index a371462..5c85c3d 100644
--- a/lib/sfIsisImporterEntities.class.php
+++ b/lib/sfIsisImporterEntities.class.php
@@ -184,8 +184,18 @@ class sfIsisImporterEntities {
return;
}
+ // Determine parse method.
+ if (method_exists($this, 'parse'. $entity .'Name'))
+ {
+ $method = 'parse'. $entity .'Name';
+ }
+ else
+ {
+ $method = 'parseName';
+ }
+
// Get existing element.
- $name = ($by == 'Name') ? $this->parseName($value) : $value;
+ $name = ($by == 'Name') ? $this->{$method}($value) : $value;
$element = call_user_func(array($entity, 'getBy'. $by), $name);
// Create new element if needed.