protected function getMatchedRouteNamePart($key)
{
if (is_null($this->matchedRouteNameParts)) {
$routeName = $this->getRouter()->getMatchedRoute()->getName();
if (!$routeName) {
return null;
}
$this->matchedRouteNameParts = @unserialize($routeName);
}
if (is_array($this->matchedRouteNameParts) && array_key_exists($key, $this->matchedRouteNameParts)) {
return $this->matchedRouteNameParts[$key];
}
return null;
}