Author: mcantelon
Date: Wed Jan 18 17:40:47 2012
New Revision: 10719

Log:
Added helper to add a handler to multiple columns at once.

Modified:
   trunk/lib/QubitFlatfileImport.class.php

Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php     Wed Jan 18 16:14:43 2012        
(r10718)
+++ trunk/lib/QubitFlatfileImport.class.php     Wed Jan 18 17:40:47 2012        
(r10719)
@@ -526,6 +526,22 @@
   }
 
   /**
+   * Add an ad-hoc column handler to multiple columns
+   *
+   * @param array $columns  names of columns
+   * @param closure $handler  column handling logic
+   *
+   * @return void
+   */
+  public function addColumnHandlers($columns, $handler)
+  {
+    foreach($columns as $column)
+    {
+      $this->addColumnHandler($column, $handler);
+    }
+  }
+
+  /**
    * Handle mapping of column to object property
    *
    * @param array $mapDefinition  array defining which property to map to and

-- 
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.

Reply via email to