public function getPath()
{
$pattern = '';
if ($this->getOption('add_locale_pattern')) {
$pattern .= '/{_locale}';
}
$pattern .= $this->getStaticPrefix();
$pattern .= $this->getVariablePattern();
if ($this->getOption('add_format_pattern') && !preg_match('/(.+)\\.[a-z]+$/i', $pattern, $matches)) {
$pattern .= '.{_format}';
}
return $pattern;
}
/** * {@inheritdoc} * * Handle the trailing slash option. */ public function getPath() { $pattern = parent::getPath(); if ($this->getOption('add_trailing_slash') && '/' !== $pattern[strlen($pattern) - 1]) { $pattern .= '/'; } return $pattern; }