Author: mcantelon
Date: Mon Jan 9 16:31:46 2012
New Revision: 10600
Log:
Added functionality in preparation to reporting which handlers are referencing
non-existant import columns.
Modified:
trunk/lib/QubitFlatfileImport.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Mon Jan 9 00:03:05 2012
(r10599)
+++ trunk/lib/QubitFlatfileImport.class.php Mon Jan 9 16:31:46 2012
(r10600)
@@ -111,6 +111,37 @@
&& !isset($this->arrayColumns[$column]);
}
+ protected function combineArraysWithoutDuplicates()
+ {
+ $args = func_get_args();
+ $combined = array();
+
+ // go through each array providesd
+ for($index = 0; $index < count($args); $index++)
+ {
+ // for each element of array, add to combined array if element isn't a
dupe
+ foreach($args[$index] as $element)
+ {
+ if (!in_array($element, $combined)) array_push($combined, $element);
+ }
+ }
+
+ return $combined;
+ }
+
+ public function determineHandledColumns()
+ {
+ $handledColumns = $this->combineArraysWithoutDuplicates(
+ $this->standardColumns,
+ $this->variableColumns,
+ array_keys($this->columnMap),
+ array_keys($this->handlers),
+ array_keys($this->propertyMap),
+ array_keys($this->noteMap),
+ array_keys($this->arrayColumns)
+ );
+ }
+
public function determineUnhandledColumns()
{
$ignored = array();
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.