Handle on data input

@param array $data The input data row

@return null
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);
    }
26481
protected function onInput($data)
    {
        //Process data here
        foreach ($this->params as $func => $columns) {
            switch ($func) {
            case "upper":
                foreach ($columns as $col) {
                    $data[$col] = strtoupper($data[$col]);
                }
                break;
            case "lower":
                foreach ($columns as $col) {
                    $data[$col] = strtolower($data[$col]);
                }
                break;
            case "first-cap":
                foreach ($columns as $col) {
                    $data[$col] = ucfirst($data[$col]);
                }
                break;
            case "all-cap":
                foreach ($columns as $col) {
                    $data[$col] = ucwords($data[$col]);
                }
                break;
            }
        }
        $this->next($data);
    }
982728
protected function onInput($data)
    {
        $columnsMeta = $this->metaData['columns'];
        $filters = $this->filters;
        $logicalOperator = 'and';
        $isFiltered = true;
        foreach ($filters as $i => $filter) {
            if (is_array($filter)) {
                $field = $filter[0];
                $type = $columnsMeta[$field]['type'];
                if (!isset($data[$field])) {
                    continue;
                }

                $filterResult = $this->isFiltered($filter, $data[$field], $type);
                if ($logicalOperator === 'and') {
                    $isFiltered = $isFiltered && $filterResult;
                }
                if ($logicalOperator === 'or') {
                    $isFiltered = $isFiltered || $filterResult;
                }
            } else if ($filter === 'and' || $filter === 'or') {
                $logicalOperator = $filter;
                if ($filter === 'or' && $i === 0) {
                    $isFiltered = false;
                }

            }
        }
        if ($isFiltered) {
            $this->next($data);
        }
    }
231609
public function onInput($data)
    {
        //Process data here
        foreach ($this->params as $copy => $original) {
            $data[$copy] = $data[$original];
        }
        $this->next($data);
    }
702401
protected function handleResult($data)
    {
        if (empty($data->data)) {
            $data->data = new stdClass();
        }
        if ($data->http_code !== 200) {
            $data->data->is_error = true;
            $data->data->http_code = $data->http_code;
        }

        return $data->data;
    }
815099
public static function trigger($event, $data = null)
	{
		if (!is_array($data)) {
			$data = array($data);
		}

		if (empty(self::$events[$event])) {
			return true;
		}
		
		foreach (self::$events[$event] as $callback) {
			if (!is_callable($callback)) {
				continue;
			}
			call_user_func_array($callback, $data);
		}
		
		return true;
	}
358250
public static function fire($event, $data = null)
    {
        if (!is_array($data)) {
            $data = array($data);
        }
        array_unshift($data, $event);

        $retval = true;

        foreach (array('*', $event) as $e) {
            if (!array_key_exists($e, self::$events)) {
                continue;
            }

            foreach (self::$events[$e] as $callback) {
                if (!is_callable($callback)) {
                    continue;
                }

                if (($retval = call_user_func_array($callback, $data)) === false) {
                    break 2;
                }
            }
        }

        return $retval !== false;
    }
1230901
public function set(array $data) {
		foreach ($data as $name => $value) {
			$this->__set($name, $value);
		}
	}
1319296
public function onData(string $data)
    {
        $data = trim($data);
        $this->log('->' . $data);
        $chunks = explode(' ', $data);
        $command = $chunks[0];
        unset($chunks[0]);
        $input = '';
        if (count($chunks) > 0) {
            $input = implode(' ', $chunks);
        }
        $input = trim($input);
        if ($this->node->getCommands()->has($command)) {
            $this
                ->node
                ->getCommands()
                ->get($command)
                ->handle($this, $input)
                ->then(function (array $lines) {
                    foreach ($lines as $line) {
                        $this->write($line);
                    }
                });
            return;
        }

        $list = implode(', ', $this->node->getCommands()->keys());
        $this->write(
            '# Unknown command. Try ' . substr_replace($list, ' or ', strrpos($list, ', '), 2)
        );
    }
16536
public function onInput($row)
    {
        $keys = array_keys($row);
        $values = array_values($row);
        for ($i = 0; $i < count($keys); $i++) {
            if (isset($this->params[$keys[$i]])) {
                $keys[$i] = $this->params[$keys[$i]];
            }
        }
        $this->next(array_combine($keys, $values));
    }
1169390
final public function create(array $data)
    {
        $this->query->setStartInsert($data);
        
        $this->query->prepare()->bindValuesForInsert($data)->execute();

        $this->setRowCount();

        $this->query->close();
    }
65336
protected function onInput($data)
    {
        // print_r($data);
        $this->rowNum++;
        foreach ($this->params as $cKey=>$cValue) {
            switch(gettype($cValue["exp"]))
            {
            case "string":
                $expression = $cValue["exp"];
                // echo $expression . ' || ';
                foreach ($data as $k=>$v) {
                    if (is_string($v) || is_numeric($v)) {
                        $expression = str_replace("{".$k."}", $v, $expression);
                    }
                }

                //predefined row
                $expression = str_replace("{#}", $this->rowNum, $expression);
                // echo $expression . ' <br> ';
                eval('$data[$cKey]='.$expression.';');
                break;
            case "object":
                $function = $cValue["exp"];
                $data[$cKey] = $function($data);
                break;
            }
        }
        $this->next($data);
    }
773594
protected function loadData(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }
1167560
public function onData($data)
    {
        if (!$this->handshaked) {
            return $this->handshake($data);
        }
        return $this->handle($data);
    }
416585
protected final function validateNewData(array $data = null) {
		if ($data === null && isset($this->_formData)) {
			$data = $this->_formData;
		}
		if ($this->rules) {
			return $this->validateData($this->rules, $data);
		}

		return true;
	}
907000
public function bind(array $data)
    {
        foreach ($data as $property => $value) {
            if ($this->has($property)) {
                $this->$property = $value;
            }
        }
    }
1242440
public function process(ArrayAccess $data) {
		foreach ($this->_config['fields'] as $field) {
			if (!empty($data[$field])) {
				$data[$field] = $this->_prepareInput($data[$field]);
			}
		}
	}