Handle on data input

@param array $row The input data row

@return null
17192
protected function onInput($row)
    {
        $func = Util::get($this->params, '{value}', null);
        if (is_callable($func)) {
            $return = $func(
                $row,
                $this->metaData,
                $this->index, 
                $this->mapState
            );

            if (is_array($return) && (array_key_exists('{rows}', $return)
                ||array_key_exists('{state}', $return))
            ) {
                $newRows = Util::get($return, '{rows}', []);
                $this->mapState = Util::get($return, '{state}', $this->mapState);
            } else {
                $newRows = $return;
            }
            $newRows = $this->to2DArray($newRows);
            if (!$this->metaSent) {
                $colMetas = $this->newMeta['columns'];
                $newRow = Util::get($newRows, 0, []);
                foreach (array_keys($newRow) as $newCol) {
                    if (!isset($colMetas[$newCol])) {
                        $type = $this->guessType($newRow[$newCol]);
                        $colMetas[$newCol] = ['type' => $type];
                    }
                }
                $this->newMeta['columns'] = $colMetas;
                $this->sendMeta($this->newMeta);
                $this->metaSent = true;
            }
            foreach ($newRows as $row) {
                $this->next($row);
            }
        } else {
            if (!$this->metaSent) {
                $this->sendMeta($this->newMeta);
                $this->metaSent = true;
            }
            $this->next($row);
        }
        $this->index++;
    }
1155729
public function execute($row = null)
    {
        if ($row) {
            if ((! isset($row['grs_id_user'])) &&
                    isset($row['grs_ssn']) &&
                    $this->targetModel instanceof \Gems_Model_RespondentModel &&
                    $this->targetModel->hashSsn !== \Gems_Model_RespondentModel::SSN_HIDE) {

                if (\Gems_Model_RespondentModel::SSN_HASH === $this->targetModel->hashSsn) {
                    $search = $this->targetModel->saveSSN($row['grs_ssn']);
                } else {
                    $search = $row['grs_ssn'];
                }

                $sql = 'SELECT grs_id_user FROM gems__respondents WHERE grs_ssn = ?';
                $id  = $this->db->fetchOne($sql, $search);

                // Check for change in patient ID
                if ($id) {
                    if (isset($row['gr2o_id_organization']) &&
                            $this->targetModel instanceof \MUtil_Model_DatabaseModelAbstract) {

                        $sql = 'SELECT gr2o_patient_nr
                                FROM gems__respondent2org
                                WHERE gr2o_id_user = ? AND gr2o_id_organization = ?';

                        $patientId = $this->db->fetchOne($sql, array($id, $row['gr2o_id_organization']));

                        if ($patientId) {
                            // Change the patient number
                            $copyId       = $this->targetModel->getKeyCopyName('gr2o_patient_nr');
                            $row[$copyId] = $patientId;
                        }
                    }

                    $row['grs_id_user']  = $id;
                    $row['gr2o_id_user'] = $id;
                }
            }

            parent::execute($row);
        }
    }
405039
private function bindRowValues(array $row): array
    {
        $placeholders = [];
        foreach ($row as $key => $value) {
            $placeholder = $this->addBindingValue($key, $value);
            array_push($placeholders, $placeholder);
        }
        return $placeholders;
    }
930585
protected function onInput($data)
    {
        //Process data here
        foreach ($this->params as $column) {
            if ($this->character_mask) {
                $data[$column] = trim($data[$column], $this->character_mask);
            } else {
                $data[$column] = trim($data[$column]);
            }
        }
        $this->next($data);
    }
1091507
public function onInput($row)
    {
        //Process data here
        foreach ($this->params as $copy => $original) {
            $row[$copy] = $row[$original] - Utility::get($this->previousRow, $original, 0);
        }
        $this->previousRow = $row;
        $this->next($row);
    }
1325450
public function processRow($row)
    {
        $rowNode = $this->doc->createElement('row');
        $this->rootNode->appendChild($rowNode);

        foreach ($row as $columnName => $columnValue) {
            $colNode = $this->doc->createElement('column');
            $colNode->setAttribute('name', $columnName);

            if ($columnValue != null) {
                $columnValue = trim($columnValue);
                $colNode->nodeValue = $columnValue;
            }
            $rowNode->appendChild($colNode);
        }
    }
972126
protected function onInput($data)
    {
        //Process data here
        foreach ($this->params as $cName => $cParams) {
            if ($data[$cName]) {
                //Only if the value of column is not empty
                $format = Utility::get($this->metaData["columns"][$cName], "format");

                $datetime = ($format) ? \DateTime::createFromFormat($format, $data[$cName]) : new \DateTime($data[$cName]);

                $data[$cName] = $datetime->format($cParams["formatString"]);
                if ($cParams["bucket"] == "quarter") {
                    $data[$cName] = Utility::strReplace(
                        $data[$cName],
                        array(
                            "{q}" => ceil(intval($datetime->format("n")) / 3),
                        )
                    );
                }
            }
        }
        $this->next($data);
    }
1258182
public function map(array &$row)
    {
        $inputs = $this->parse($this->inputsParams, $row);
        $outputs = $this->parse($this->outputParams, $row);


        return $inputs && $outputs ? [$inputs, $outputs] : null;
    }
645842
protected function onInput($data)
    {
        $this->index++;
        if ($this->index >= $this->offset && $this->index < $this->offset + $this->limit) {
            $this->next($data);
        }
    }
231609
public function onInput($data)
    {
        //Process data here
        foreach ($this->params as $copy => $original) {
            $data[$copy] = $data[$original];
        }
        $this->next($data);
    }
416429
public function rows(array $data): void
    {
        $this->rows = $data;
        $pdoStatement = $this->provideStatement();
        $this->execute($pdoStatement);
    }
384524
public function getAlt($row)
    {
        $altField = $this->getData('config/altField') ?: self::ALT_FIELD;
        return isset($row[$altField]) ? $row[$altField] : null;
    }
253939
public function process(array $row)
    {
        foreach ($this->processors as $processor) {
            $row = call_user_func($processor, $row);
        }

        return $row;
    }
1233912
public function reset( $row = null ) {

		/**
		 * Runs directly before the Pods object is reset by reset()
		 *
		 * @since unknown
		 *
		 * @param int|string|null The ID of the row being reset to or null if being reset to the beginning.
		 * @param object|Pods $this Current Pods object.
		 */
		do_action( 'pods_pods_reset', $row, $this );

		$this->data->reset( $row );

		return $this;
	}
1146086
public function addRow(array $row)
    {
        if (is_array($this->fields)) {
            $assoc = $row;
            $row = [];
            foreach ($this->fields as $field) {
                $row[] = isset($assoc[$field]) ? $assoc[$field] : "";
            }
        }

        $this->data[] = $row;

        return $this;
    }
1234599
public function processBeforeSave(array $row)
    {
        if ($this->getMeta('nested', false)) {
            $nestedNames = $this->getMeta('nestedNames');
            foreach($nestedNames as $nestedName) {
                if (isset($row[$nestedName])) {
                    foreach($row[$nestedName] as $key => $answer) {
                        $a = array_shift($answer);
                        if (empty($a)) {
                            unset($row[$nestedName][$key]);
                        }
                    }
                }
            }
        }

        if (!isset($row['gto_completion_time']) || $row['gto_completion_time']) {
            $row['gto_completion_time'] = new \MUtil_Date;
        }

        $row = parent::processBeforeSave($row);

        return $row;
    }
1278330
private function decode(array $row): ?array
    {
        if (null === ($encoded = $row[$this->name()])) {
            return null;
        }

        if (false === ($decoded  = unserialize($encoded, ['allowed_classes' => false]))) {
            return null;
        }
        if (!\is_array($decoded)) {
            return null;
        }

        return $decoded;
    }