protected substitutePlaceholderNames ( array $matches ) : array | ||
$matches | array | result of `preg_match()` call |
return | array | input array with replaced placeholder keys |
protected function substitutePlaceholderNames(array $matches)
{
foreach ($this->placeholders as $placeholder => $name) {
if (isset($matches[$placeholder])) {
$matches[$name] = $matches[$placeholder];
unset($matches[$placeholder]);
}
}
return $matches;
}