framework/web/UrlRule.php
protected function substitutePlaceholderNames(array $matches)
    {
        foreach ($this->placeholders as $placeholder => $name) {
            if (isset($matches[$placeholder])) {
                $matches[$name] = $matches[$placeholder];
                unset($matches[$placeholder]);
            }
        }

        return $matches;
    }
protected function substitutePlaceholderNames(array $matches)
    {
        foreach ($this->placeholders as $placeholder => $name) {
            if (isset($matches[$placeholder])) {
                $matches[$name] = $matches[$placeholder];
                unset($matches[$placeholder]);
            }
        }

        return $matches;
    }
protected function substitutePlaceholderNames ( array $ matches ) { foreach ( $ this -> placeholders as $ placeholder => $ name ) { if ( isset ( $ matches [ $ placeholder ] ) ) { $ matches [ $ name ] = $ matches [ $ placeholder ] ; unset ( $ matches [ $ placeholder ] ) ; } } return $ matches ; }
Iterates over [[placeholders]] and checks whether each placeholder exists as a key in $matches array.
When found - replaces this placeholder key with a appropriate name of matching parameter.
Used in [[parseRequest()]], [[createUrl()]].

@param array $matches result of `preg_match()` call
@return array input array with replaced placeholder keys
@see placeholders
@since 2.0.7
Iterates over [[ placeholders ]] and checks whether each placeholder exists as a key in $matches array . When found - replaces this placeholder key with a appropriate name of matching parameter . Used in [[ parseRequest () ]] [[ createUrl () ]] .