$92 GRAYBYTE WORDPRESS FILE MANAGER $86

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php53/usr/share/pear/Symfony/Component/Routing/Matcher/

HOME
Current File : /opt/alt/php53/usr/share/pear/Symfony/Component/Routing/Matcher//RedirectableUrlMatcher.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Routing\Matcher;

use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Route;

/**
 * @author Fabien Potencier <[email protected]>
 *
 * @api
 */
abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
{
    /**
     * {@inheritdoc}
     */
    public function match($pathinfo)
    {
        try {
            $parameters = parent::match($pathinfo);
        } catch (ResourceNotFoundException $e) {
            if ('/' === substr($pathinfo, -1) || !in_array($this->context->getMethod(), array('HEAD', 'GET'))) {
                throw $e;
            }

            try {
                parent::match($pathinfo.'/');

                return $this->redirect($pathinfo.'/', null);
            } catch (ResourceNotFoundException $e2) {
                throw $e;
            }
        }

        return $parameters;
    }

    /**
     * {@inheritDoc}
     */
    protected function handleRouteRequirements($pathinfo, $name, Route $route)
    {
        // expression condition
        if ($route->getCondition() && !$this->getExpressionLanguage()->evaluate($route->getCondition(), array('context' => $this->context, 'request' => $this->request))) {
            return array(self::REQUIREMENT_MISMATCH, null);
        }

        // check HTTP scheme requirement
        $scheme = $route->getRequirement('_scheme');
        if ($scheme && $this->context->getScheme() !== $scheme) {
            return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, $scheme));
        }

        return array(self::REQUIREMENT_MATCH, null);
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.55 PM
root / root
0755
Dumper
--
3 Mar 2024 10.55 PM
root / root
0755
ApacheUrlMatcher.php
3.36 KB
18 Dec 2019 11.20 AM
root / root
0644
RedirectableUrlMatcher.php
1.848 KB
18 Dec 2019 11.20 AM
root / root
0644
RedirectableUrlMatcherInterface.php
0.85 KB
18 Dec 2019 11.20 AM
root / root
0644
RequestMatcherInterface.php
1.175 KB
18 Dec 2019 11.20 AM
root / root
0644
TraceableUrlMatcher.php
4.63 KB
18 Dec 2019 11.20 AM
root / root
0644
UrlMatcher.php
7.033 KB
18 Dec 2019 11.20 AM
root / root
0644
UrlMatcherInterface.php
1.258 KB
18 Dec 2019 11.20 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF