<?php
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\RequestContext;
/**
* This class has been auto-generated
* by the Symfony Routing Component.
*/
class srcDevDebugProjectContainerUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
{
public function __construct(RequestContext $context)
{
$this->context = $context;
}
public function match($pathinfo)
{
$allow = $allowSchemes = [];
if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) {
return $ret;
}
if ($allow) {
throw new MethodNotAllowedException(array_keys($allow));
}
if (!in_array($this->context->getMethod(), ['HEAD', 'GET'], true)) {
// no-op
} elseif ($allowSchemes) {
redirect_scheme:
$scheme = $this->context->getScheme();
$this->context->setScheme(key($allowSchemes));
try {
if ($ret = $this->doMatch($pathinfo)) {
return $this->redirect($pathinfo, $ret['_route'], $this->context->getScheme()) + $ret;
}
} finally {
$this->context->setScheme($scheme);
}
} elseif ('/' !== $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') {
$pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo;
if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) {
return $this->redirect($pathinfo, $ret['_route']) + $ret;
}
if ($allowSchemes) {
goto redirect_scheme;
}
}
throw new ResourceNotFoundException();
}
private function doMatch(string $pathinfo, array &$allow = [], array &$allowSchemes = []): array
{
$allow = $allowSchemes = [];
$pathinfo = rawurldecode($pathinfo) ?: '/';
$trimmedPathinfo = rtrim($pathinfo, '/') ?: '/';
$context = $this->context;
$requestMethod = $canonicalMethod = $context->getMethod();
if ('HEAD' === $requestMethod) {
$canonicalMethod = 'GET';
}
switch ($trimmedPathinfo) {
default:
$routes = [
'/_profiler' => [['_route' => '_profiler_home', '_controller' => 'web_profiler.controller.profiler::homeAction'], null, null, null, true],
'/_profiler/search' => [['_route' => '_profiler_search', '_controller' => 'web_profiler.controller.profiler::searchAction'], null, null, null, false],
'/_profiler/search_bar' => [['_route' => '_profiler_search_bar', '_controller' => 'web_profiler.controller.profiler::searchBarAction'], null, null, null, false],
'/_profiler/phpinfo' => [['_route' => '_profiler_phpinfo', '_controller' => 'web_profiler.controller.profiler::phpinfoAction'], null, null, null, false],
'/_profiler/open' => [['_route' => '_profiler_open_file', '_controller' => 'web_profiler.controller.profiler::openAction'], null, null, null, false],
'/amp' => [['_route' => 'index_amp', 'is_amp' => true, '_controller' => 'App\\Controller\\DefaultController::index'], null, null, null, false],
'/' => [['_route' => 'index', '_controller' => 'App\\Controller\\DefaultController::index'], null, null, null, false],
'/404' => [['_route' => 'page404', '_controller' => 'App\\Controller\\DefaultController::page404'], null, null, null, false],
'/site-map' => [['_route' => 'site_map', '_controller' => 'App\\Controller\\DefaultController:siteMap'], null, null, null, false],
'/dieu-khoan-su-dung' => [['_route' => 'term_condition', '_controller' => 'App\\Controller\\DefaultController:termCondition'], null, null, null, false],
'/gioi-thieu' => [['_route' => 'about_us', '_controller' => 'App\\Controller\\DefaultController:aboutUs'], null, null, null, false],
'/lien-he' => [['_route' => 'contact', '_controller' => 'App\\Controller\\DefaultController:contact'], null, null, null, false],
'/cache-manager' => [['_route' => 'cache_management', '_controller' => 'App\\Controller\\CacheManagerController::cacheManager'], null, null, null, false],
'/cache-manager/update-config' => [['_route' => 'cache_update_config', '_controller' => 'App\\Controller\\CacheManagerController::updateConfig'], null, null, null, false],
'/register' => [['_route' => 'register', '_controller' => 'App\\Controller\\DefaultController::register'], null, null, null, false],
'/rss/instant-articles.rss' => [['_route' => 'rss_ia', '_controller' => 'App\\Controller\\RssController::instantArticleAction'], null, null, null, false],
'/sitemap.xml' => [['_route' => 'sitemap', '_controller' => 'App\\Controller\\SitemapController::indexAction'], null, null, null, false],
'/sitemaps/category.xml' => [['_route' => 'sitemap_category', '_controller' => 'App\\Controller\\SitemapController::categoryAction'], null, null, null, false],
'/sitemap-news.xml' => [['_route' => 'sitemap_news', '_controller' => 'App\\Controller\\SitemapController::sitemapNews'], null, null, null, false],
'/photos' => [['_route' => 'photo_gallery', '_controller' => 'App\\Controller\\Photo\\IndexController::index'], null, null, null, false],
'/ajax/photo_gallery.json' => [['_route' => 'ajax_photo_gallery', '_controller' => 'App\\Controller\\Photo\\AjaxController::index'], null, null, null, false],
'/search' => [['_route' => 'search_list', '_controller' => 'App\\Controller\\Search\\IndexController::index'], null, null, null, false],
'/ajax/search' => [['_route' => 'search_load_more', '_controller' => 'App\\Controller\\Search\\AjaxController::index'], null, null, null, false],
'/ajax/post-load-more' => [['_route' => 'post_load_more', '_controller' => 'App\\Controller\\Post\\AjaxController::index'], null, null, null, false],
'/lg.gif' => [['_route' => 'update_view', '_controller' => 'App\\Controller\\Post\\AjaxController:updateView'], null, null, null, false],
'/box-content/get-by-ids' => [['_route' => 'ajax_get_box_content', '_controller' => 'App\\Controller\\AjaxController::getBoxByIds'], null, null, null, false],
'/ajax/tag-posts.json' => [['_route' => 'ajax_get_tag_posts', '_controller' => 'App\\Controller\\Tag\\AjaxController::getTagPostsAction'], null, null, null, false],
'/ajax/category' => [['_route' => 'category_load_more', '_controller' => 'App\\Controller\\Category\\AjaxController::index'], null, null, null, false],
];
if (!isset($routes[$trimmedPathinfo])) {
break;
}
list($ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash) = $routes[$trimmedPathinfo];
if ('/' !== $pathinfo && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) {
if ('GET' === $canonicalMethod && (!$requiredMethods || isset($requiredMethods['GET']))) {
return $allow = $allowSchemes = [];
}
break;
}
$hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
if ($hasRequiredScheme) {
$allow += $requiredMethods;
}
break;
}
if (!$hasRequiredScheme) {
$allowSchemes += $requiredSchemes;
break;
}
return $ret;
}
$matchedPathinfo = $pathinfo;
$regexList = [
0 => '{^(?'
.'|/_(?'
.'|error/(\\d+)(?:\\.([^/]++))?(*:38)'
.'|wdt/([^/]++)(*:57)'
.'|profiler/([^/]++)(?'
.'|/(?'
.'|search/results(*:102)'
.'|router(*:116)'
.'|exception(?'
.'|(*:136)'
.'|\\.css(*:149)'
.')'
.')'
.'|(*:159)'
.')'
.')'
.'|/((?:rss|feed))(*:184)'
.'|/([a-z0-9\\-]+)/feed\\.html(*:217)'
.')/?$}sD',
217 => '{^(?'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-‘’%]+)\\-(\\d+)/feed(*:271)'
.')/?$}sDu',
271 => '{^(?'
.'|/([a-z0-9\\-]+)/feed(*:297)'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)/feed(*:338)'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)/([a-z0-9\\-]+)/feed(*:393)'
.'|/rss/author\\-([^/\\.]++)\\.rss(*:429)'
.'|/sitemap(?'
.'|s/(?'
.'|tag\\-([^/\\.]++)\\.xml(*:473)'
.'|a(?'
.'|uthor\\-(\\d+)\\.xml(*:502)'
.'|rticle\\-(\\d{6})\\.xml(*:530)'
.')'
.')'
.'|\\-news/article\\-([^/\\.]++)\\.xml(*:571)'
.')'
.')/?$}sD',
571 => '{^(?'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)\\-(\\d+)/amp(*:617)'
.')/?$}sDu',
617 => '{^(?'
.'|/post\\-(\\d+)(*:636)'
.')/?$}sD',
636 => '{^(?'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)\\-(\\d+)(*:678)'
.')/?$}sDu',
678 => '{^(?'
.'|/preview\\-([^/\\.]++)\\.html(*:711)'
.')/?$}sD',
711 => '{^(?'
.'|/([a-z0-9:\\-_]+)\\.html(*:740)'
.')/?$}sDu',
740 => '{^(?'
.'|/([a-z0-9\\-]+)/amp(*:765)'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)/amp(*:805)'
.')/?$}sD',
805 => '{^(?'
.'|/([a-z0-9\\-]+)(*:826)'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)(*:862)'
.')/?$}sDu',
862 => '{^(?'
.'|/([a-z0-9\\-]+)/([a-z0-9\\-]+)/([a-z0-9\\-]+)(*:911)'
.')/?$}sD',
];
foreach ($regexList as $offset => $regex) {
while (preg_match($regex, $matchedPathinfo, $matches)) {
switch ($m = (int) $matches['MARK']) {
default:
$routes = [
38 => [['_route' => '_twig_error_test', '_controller' => 'twig.controller.preview_error::previewErrorPageAction', '_format' => 'html'], ['code', '_format'], null, null, false, true],
57 => [['_route' => '_wdt', '_controller' => 'web_profiler.controller.profiler::toolbarAction'], ['token'], null, null, false, true],
102 => [['_route' => '_profiler_search_results', '_controller' => 'web_profiler.controller.profiler::searchResultsAction'], ['token'], null, null, false, false],
116 => [['_route' => '_profiler_router', '_controller' => 'web_profiler.controller.router::panelAction'], ['token'], null, null, false, false],
136 => [['_route' => '_profiler_exception', '_controller' => 'web_profiler.controller.exception::showAction'], ['token'], null, null, false, false],
149 => [['_route' => '_profiler_exception_css', '_controller' => 'web_profiler.controller.exception::cssAction'], ['token'], null, null, false, false],
159 => [['_route' => '_profiler', '_controller' => 'web_profiler.controller.profiler::panelAction'], ['token'], null, null, false, true],
184 => [['_route' => 'rss', '_controller' => 'App\\Controller\\RssController::rss'], ['map'], null, null, false, true],
217 => [['_route' => 'rss_tag', '_controller' => 'App\\Controller\\RssController::tagsRss'], ['tagSlug'], null, null, false, false],
271 => [['_route' => 'rss_detail_news', '_controller' => 'App\\Controller\\RssController::detailFeed'], ['cateSlug', 'slug', 'postId'], null, null, false, false],
297 => [['_route' => 'rss_category', '_controller' => 'App\\Controller\\RssController::cateRss'], ['cateSlug'], null, null, false, false],
338 => [['_route' => 'rss_sub_cate', '_controller' => 'App\\Controller\\RssController::cateRss'], ['parentSlug', 'cateSlug'], null, null, false, false],
393 => [['_route' => 'rss_sub_cate_level2', '_controller' => 'App\\Controller\\RssController::cateRss'], ['rootSlug', 'parentSlug', 'cateSlug'], null, null, false, false],
429 => [['_route' => 'rss_author', '_controller' => 'App\\Controller\\RssController::authorAction'], ['slug'], null, null, false, false],
473 => [['_route' => 'sitemap_tag', '_controller' => 'App\\Controller\\SitemapController::tagAction'], ['page'], null, null, false, false],
502 => [['_route' => 'sitemap_author', '_controller' => 'App\\Controller\\SitemapController::authorAction'], ['page'], null, null, false, false],
530 => [['_route' => 'sitemap_article', '_controller' => 'App\\Controller\\SitemapController::articleAction'], ['dateString'], null, null, false, false],
571 => [['_route' => 'sitemap_article_news', '_controller' => 'App\\Controller\\SitemapController::articleNews'], ['dateString'], null, null, false, false],
617 => [['_route' => 'post_detail_amp', 'is_amp' => true, '_controller' => 'App\\Controller\\Post\\IndexController::index'], ['cateSlug', 'slug', 'postId'], null, null, false, false],
636 => [['_route' => 'post_detail_short', '_controller' => 'App\\Controller\\Post\\IndexController::detailShort'], ['postId'], null, null, false, true],
678 => [['_route' => 'post_detail', '_controller' => 'App\\Controller\\Post\\IndexController::index'], ['cateSlug', 'slug', 'postId'], null, null, false, true],
711 => [['_route' => 'post_preview', '_controller' => 'App\\Controller\\Post\\IndexController:preview'], ['postId'], null, null, false, false],
740 => [['_route' => 'tag', '_controller' => 'App\\Controller\\Tag\\IndexController::detailAction'], ['slug'], null, null, false, false],
765 => [['_route' => 'cate_amp', 'is_amp' => true, '_controller' => 'App\\Controller\\Category\\IndexController::index'], ['cateSlug'], null, null, false, false],
805 => [['_route' => 'sub_cate_amp', 'is_amp' => true, '_controller' => 'App\\Controller\\Category\\IndexController::index'], ['parentSlug', 'cateSlug'], null, null, false, false],
826 => [['_route' => 'cate', 'parentSlug' => null, '_controller' => 'App\\Controller\\Category\\IndexController::index'], ['cateSlug'], null, null, false, true],
862 => [['_route' => 'sub_cate', '_controller' => 'App\\Controller\\Category\\IndexController::index'], ['parentSlug', 'cateSlug'], null, null, false, true],
911 => [['_route' => 'sub_cate_level2', '_controller' => 'App\\Controller\\Category\\IndexController::index'], ['rootSlug', 'parentSlug', 'cateSlug'], null, null, false, true],
];
list($ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar) = $routes[$m];
$hasTrailingVar = $trimmedPathinfo !== $pathinfo && $hasTrailingVar;
if ('/' !== $pathinfo && !$hasTrailingVar && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) {
if ('GET' === $canonicalMethod && (!$requiredMethods || isset($requiredMethods['GET']))) {
return $allow = $allowSchemes = [];
}
break;
}
if ($hasTrailingSlash && $hasTrailingVar && preg_match($regex, rtrim($matchedPathinfo, '/') ?: '/', $n) && $m === (int) $n['MARK']) {
$matches = $n;
}
foreach ($vars as $i => $v) {
if (isset($matches[1 + $i])) {
$ret[$v] = $matches[1 + $i];
}
}
$hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
if ($hasRequiredScheme) {
$allow += $requiredMethods;
}
break;
}
if (!$hasRequiredScheme) {
$allowSchemes += $requiredSchemes;
break;
}
return $ret;
}
if (911 === $m) {
break;
}
$regex = substr_replace($regex, 'F', $m - $offset, 1 + strlen($m));
$offset += strlen($m);
}
}
if ('/' === $pathinfo && !$allow && !$allowSchemes) {
throw new Symfony\Component\Routing\Exception\NoConfigurationException();
}
return [];
}
}