$value) { if ($idx % 3 === 2) { $elements[$idx] = []; $elements[$idx]['matchString'] = $value; } } return SoftReferenceParserResult::create( substr(implode('', $parts), 1, -1), $elements ); } /** * @param string $parserKey The softref parser key. * @param array $parameters Parameters of the softlink parser. Basically this is the content inside optional []-brackets after the softref keys. Parameters are exploded by "; */ public function setParserKey(string $parserKey, array $parameters): void { $this->parserKey = $parserKey; $this->parameters = $parameters; } public function getParserKey(): string { return $this->parserKey; } }