@param $data
@param $rawLine

@throws \Exception
483770
protected function handleOtherCases($data, $rawLine)
    {
        switch ($data['key']) {
            case 'msgctxt':
            case 'msgid':
            case 'msgid_plural':
            case 'msgstr':
                $this->state = $data['key'];
                $this->addEntryData($data['value']);
                break;
            default:
                if (strpos($data['key'], 'msgstr[') !== false) {
                    // translated plurals
                    $this->state = 'msgstr';
                    $this->addEntryData($data['value']);
                } else {
                    $this->processContinuedLineInSameState($rawLine);
                }
                break;
        }
    }
602010
public function setRawQueryString($rawQueryString)
    {
        $this->stateChanged = true;
        $path = $this->prefixWithNamespace('q');
        $this->argumentsAccessor->set($path, $rawQueryString);
        return $this;
    }
454280
public function setRemoteDataUrl(string $remoteDataUrl): void
    {
        if (empty($remoteDataUrl)) {
            throw new Exception('the parameter $remoteDataUrl can not be empty', Exception::DATA_URL_MISSING);
        }

        $this->remoteDataUrl = $remoteDataUrl;
    }
874179
public static function filter($rawData)
    {
        return is_array($rawData)

            ? array_map(
                function ($value) {
                    return \Pimf\Util\Character\Clean::xss($value);
                }, $rawData
            )

            : \Pimf\Util\Character\Clean::xss($rawData);
    }
172417
public function write(string $data): void
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		fwrite($this->connection, $data);
	}
783343
public function process(array $data, array $rawSegments = null): string
    {
        $r = [];
        foreach ($data as $nrow => $segment) {

            $id = $segment[0];

            $r[] = '';
            $jsonsegment = [];
            if (isset($rawSegments[$nrow])) {
                $r[] = \trim($rawSegments[$nrow]);
            }

            if (isset($this->segments[$id])) {

                $attributes = $this->segments[$id]['attributes'];
                $details_desc = $this->segments[$id]['details'];

                $r[] = $id . ' - ' . $attributes['name'];
                $r[] = '  (' . \wordwrap($attributes['desc'], 75, PHP_EOL . '  ') . ')';

                $jsonelements = ["segmentCode" => $id];
                foreach ($segment as $idx => $detail) {
                    $n = $idx - 1;
                    if ($idx == 0 || !isset($details_desc[$n])) {
                        continue;
                    }
                    $d_desc_attr = $details_desc[$n]['attributes'];
                    $l1 = '      ' . $d_desc_attr['id'] . ' - ' . $d_desc_attr['name'];
                    $l2 = '      ' . \wordwrap($d_desc_attr['desc'], 71, PHP_EOL . '      ');

                    if (\is_array($detail)) {
                        $r[] = '  [' . $n . '] ' . \implode(',', $detail);
                        $r[] = $l1;
                        $r[] = $l2;

                        $jsoncomposite = [];
                        if (isset($details_desc[$n]['details'])) {
                            $sub_details_desc = $details_desc[$n]['details'];

                            foreach ($detail as $d_n => $d_detail) {
                                $d_sub_desc_attr = $sub_details_desc[$d_n]['attributes'];
                                $r[] = '    [' . $d_n . '] ' . $d_detail;
                                $r[] = '        id: ' . $d_sub_desc_attr['id'] . ' - ' . $d_sub_desc_attr['name'];
                                $r[] = '        ' . \wordwrap($d_sub_desc_attr['desc'], 69, PHP_EOL . '        ');
                                $r[] = '        type: ' . $d_sub_desc_attr['type'];

                                $jsoncomposite[$d_sub_desc_attr['name']] = $d_detail;
                                if (isset($d_sub_desc_attr['maxlength'])) {
                                    $r[] = '        maxlen: ' . $d_sub_desc_attr['maxlength'];
                                }
                                if (isset($d_sub_desc_attr['required'])) {
                                    $r[] = '        required: ' . $d_sub_desc_attr['required'];
                                }
                                if (isset($d_sub_desc_attr['length'])) {
                                    $r[] = '        length: ' . $d_sub_desc_attr['length'];
                                }

                                //check for skipped data
                                unset(
                                    $d_sub_desc_attr['id'],
                                    $d_sub_desc_attr['name'],
                                    $d_sub_desc_attr['desc'],
                                    $d_sub_desc_attr['type'],
                                    $d_sub_desc_attr['maxlength'],
                                    $d_sub_desc_attr['required'],
                                    $d_sub_desc_attr['length']
                                );

                                /*
                                if (!empty($d_sub_desc_attr)) {
                                  var_dump($d_sub_desc_attr);
                                }
                                */

                            }
                        }
                        $jsonelements[$d_desc_attr['name']] = $jsoncomposite;
                    } else {
                        $r[] = '  [' . $n . '] ' . $detail;
                        $r[] = $l1;
                        $r[] = $l2;
                        $jsonelements[$d_desc_attr['name']] = $detail;
                    }
                }
                $jsonsegment[$attributes['name']] = $jsonelements;
            } else {
                $r[] = $id;
                $jsonsegment["UnrecognisedType"] = $segment;
            }
            $this->jsonedi[] = $jsonsegment;
        }

        return \implode(PHP_EOL, $r);
    }
23398
public function setDataByIndex($line, $data)
    {
        $this->data[$line] = $data;
        $this->filteredData = null;
    }
208324
public function fill($data)
    {
        if ($this->data) {
            throw new Exception('Trying to feel not empty context');
        }
        
        $this->data = $data;
        $this->version++;
    }
963847
public function insert(Model $m, $data)
    {
        if (!$this->mode) {
            $this->mode = 'w';
        } elseif ($this->mode == 'r') {
            throw new Exception(['Currently reading records, so writing is not possible.']);
        }

        if (!$this->handle) {
            $this->saveHeader($m);
        }

        $line = [];

        foreach ($this->header as $name) {
            $line[] = $data[$name];
        }

        $this->putLine($line);
    }
1251663
public function remove($q, $data = [])
    {
        if (is_string($q)) {
            $this->defaults['table'] = $q;
            $q = [];
        }
        extract($this->defaults);
        extract($q);

        if (!$where)
            throw new Exception("where condition is required", 1);

        if (!$table)
            throw new Exception("table [$tabel] not defined", 1);

        if (!$limit)
            $limit = 1;

        $sql =  'DELETE FROM ' . $table;
        $sql .=
            ' WHERE ' . $where;
            # ' LIMIT '    . $limit;

        return $this->query($sql, $data);
    }
401820
public function makeThrowable(Data $data): ?ExceptionFormat
    {
        if (!$data->isThrowable()) {
            return null;
        }

        return ExceptionFormat::make($data->getValue());
    }
1068646
private function getExpectedParameterNames($rawLine)
    {
        $matches = [];
        preg_match_all('/{[a-z]}/', $rawLine, $matches);

        $expectedParameterNames = [];

        foreach ($matches[0] as $parameterNameMatch) {
            $expectedParameterNames[] = substr($parameterNameMatch, 1, strlen($parameterNameMatch) - 2);
        }

        return $expectedParameterNames;
    }
429691
protected function bindToActionDatasource(array $data)
    {
        $datasource = strtolower($this->RequestContext->getControls()->getControl('action_datasource'));

        if(empty($datasource))
            throw new Exception('No action_datasource was set');

        $this->setData($data, $datasource, true);
    }
112934
public function close($data = null, $raw = false)
    {
        if ($this->_status === self::STATUS_CLOSING || $this->_status === self::STATUS_CLOSED) {
            return;
        } else {
            if ($data !== null) {
                $this->send($data, $raw);
            }
            $this->_status = self::STATUS_CLOSING;
        }
        if ($this->_sendBuffer === '') {
            $this->destroy();
        }
    }
280540
public function setData($data)
    {
        $this->valid = false;
        $this->hash = md5($data, false);
        $this->rawData = explode("\n", $data);
    }
490421
protected function dumpRecursive ($levelKey, & $data, & $rawData) {
		if (is_object($data) || is_array($data)) {
			if (strlen($levelKey) > 0) $levelKey .= '.';
			foreach ((array) $data as $key => & $value) {
				$this->dumpRecursive($levelKey . $key, $value, $rawData);
			}
		} else {
			$rawData[] = $levelKey . ' = ' . $this->dumpScalarValue($data);
		}
	}
177586
protected function processReceive($raw)
    {
        $incomingMessage = $this->createIncomingMessage();
        $incomingMessage->setRaw($raw);
        $incomingMessage->setMessage($raw->body);
        $incomingMessage->setFrom($raw->from);
        $incomingMessage->setId($raw->sid);
        $incomingMessage->setTo($raw->to);
    }