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;
    }