Parse the title,body from data.

@param string $data

@return array
10632
protected function _parseData($data)
    {
        $output = array('title' => '','body' => '');
        $matches = array();

        if (preg_match_all('#<data name="([^"]+)">(.*?)<\/data>#si', $data, $matches)) {
            $attributes = $matches[1];
            $contents = $matches[2];

            foreach ($attributes as $i => $attribute) {
                $output[$attribute] = $contents[$i];
            }
        }

        return $output;
    }
519597
public function decode($data)
    {
        $parser = new Parser();
        $this->arrayData = (array) $parser->parse($data);
        return $this->arrayData;
    }
1046282
public function decodeData($data)
    {
        $output = array();
        while (strlen($data) > 0) {
            preg_match('/(\w+)(\[(\d+)\])?=/', $data, $matches);
            $key = $matches[1];
            $data = substr($data, strlen($matches[0]));

            if (isset($matches[3])) {
                $value = substr($data, 0, $matches[3]);
            } else {
                $next = strpos($data, '&');
                $value = $next === false ? $data : substr($data, 0, $next);
            }

            $data = substr($data, strlen($value) + 1);
            $output[$key] = $value;
        }

        return $output;
    }
93742
private static function _parseData(array $data)
    {
        foreach($data as $key => $value) {
            self::$_data[\mb_strtolower($key)] = $value;
        }
    }
852434
protected function parseValues($data)
    {
    	if (isset($data[0])) {
    		$set = $this->_parseDataItemToValues($data);
    	} else {
    		$set = $this->parse($data);
    	}
        
        foreach ($set as $v) {
            $group[] = '(' . implode(',', $v) . ')';
        }
        return empty($set) ? '' : 'VALUES '. implode(',', $group);
    }
115820
protected function parseArray($data)
    {
        $pattern = '/(\[[^\[\]]*\])/';

        set_error_handler([__CLASS__, 'handleError']);

        while (true) {
            if (!preg_match($pattern, $data, $matches) > 0) {
                break;
            }

            $stringMatches = trim($matches[0]);

            $items = explode(',', $stringMatches);

            $currentData = $this->filterItems($items);


            $data = str_replace($stringMatches, serialize($currentData), $data);
        }

        $result = unserialize($data);

        restore_error_handler();

        return $result;
    }
895065
private function getPieces(string $data) : array
    {
        $pieces = \json_decode(\base64_decode($data), true);

        if ($pieces === false ||
            !isset($pieces['version'], $pieces['hmac'], $pieces['value'], $pieces['iv'], $pieces['keySalt'], $pieces['cipher'])
        ) {
            throw new EncryptionException('Data is not in correct format');
        }

        if (!in_array($pieces['cipher'], self::$approvedCiphers)) {
            throw new EncryptionException("Cipher \"{$pieces['ciper']}\" is not supported");
        }

        if (\mb_strlen(\base64_decode($pieces['iv']), '8bit') !== \openssl_cipher_iv_length($pieces['cipher'])) {
            throw new EncryptionException('IV is incorrect length');
        }

        if (\mb_strlen(\base64_decode($pieces['keySalt']), '8bit') !== IKeyDeriver::KEY_SALT_BYTE_LENGTH) {
            throw new EncryptionException('Key salt is incorrect length');
        }

        if (\mb_strlen($pieces['hmac'], '8bit') !== self::$hmacByteLength) {
            throw new EncryptionException('HMAC is incorrect length');
        }

        return $pieces;
    }
1185344
public static function extract($data)
    {
        $results = array();
        foreach ($data as $key => $value) {
            $key = strtoupper($key);
            if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$special)) {
                if ($key === 'HTTP_CONTENT_LENGTH') {
                    continue;
                }
                $results[$key] = $value;
            }
        }

        return $results;
    }
1198947
function parse($data)
    {
        $_header = strstr($data, self::HTTP_EOF, true);
        if ($_header === false)
        {
            $this->buffer = $data;
        }
        $header = self::parseHeader($_header);
        if ($header === false)
        {
            $this->isError = true;
        }
        $this->header = $header;
        return $header;
    }
1194675
public function parseData(array $data)
    {
        $newData = [];

        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $value = $this->parseData($value);
            }

            // If the data key contains a dot, we will replace it with another character
            // sequence so it doesn't interfere with dot processing when working with
            // array based validation rules and array_dot later in the validations.
            if (Str::contains($key, '.')) {
                $newData[str_replace('.', '->', $key)] = $value;
            } else {
                $newData[$key] = $value;
            }
        }

        return $newData;
    }
875376
public function parse($data)
    {
        foreach($this->rules as $item)
        {
            if($this->checkCondition($data, $item['annotation']))
            {
                return [
                    'callable'      => $this->parseCallable([], $item['callable']),
                    'middlewares'   => $item['middlewares'] ?? [],
                ];
            }
        }
        return null;
    }
278648
public function decode($data)
    {
        $result = [];
        $offset = 0;
        $length = strlen($data);
        while ($offset < $length)
        {
            if (!strstr(substr($data, $offset), '|'))
            {
                return [];
            }
            $pos = strpos($data, '|', $offset);
            $num = $pos - $offset;
            $varname = substr($data, $offset, $num);
            $offset += $num + 1;
            $dataItem = unserialize(substr($data, $offset));
            $result[$varname] = $dataItem;
            $offset += strlen(serialize($dataItem));
        }
        return $result;
    }
307752
private function extractContentIds($data)
    {
        $ids = [];

        foreach ($data->response->docs as $doc) {
            $ids[] = $doc->content_id_id;
        }

        return $ids;
    }
614200
protected function parseData($data)
    {
        $set = $this->_parseDataItemToKeyValues($data);
        foreach ($set as $v) {
            $group[] = is_array($v) ? implode(',', $v) : $v;
        }
        return empty($set) ? '' : 'SET '. implode(',', $group);
    }
1186899
private function parseDataToString($data)
    {
        $format = $this->allowedFormats[$this->format];
        $className = "\\Ginger\\Response\\Format\\".$format['class'];
        return $className::Parse($data);

    }
717439
protected function parseData($data=null)
    {
        if (!$data) $data = $this->def['data'];
        
        if (is_array($data)) {
            foreach ($data as $k => $v) {
                if (strpos($v, '@') === 0 && class_exists('\CURLFile')) {
                    $v = ltrim($v, '@');
                    $data[$k] = new \CURLFile($v);
                }
            }
        }
        
        return $data;
    }
404367
public function parse($data)
    {
        if (!empty($data)) {
            //$data = eregi_replace(">"."[[:space:]]+"."< ",">< ",$data);
            $data = preg_replace("/>\s+</i", '><', $data);
            if (!xml_parse($this->parser, $data, true)) {
                $this->xmlParsingError = '';
                $this->xmlParsingError = xml_error_string(xml_get_error_code($this->parser));
                $this->xmlParsingError .= xml_get_current_line_number($this->parser);

                return false;
            //+++ die($reason);
            } else {
                return true;
            }
        } else {
            $this->xmlParsingError = 'No data to parse!';

            return false;
        }
    }