Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Optimised dumped router matcher, prevent unneeded function calls. #21755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Prev Previous commit
It's scheme not schema.
  • Loading branch information
frankdejonge committed Feb 28, 2017
commit 4ab821bc5f3bbc8db4faff97bf19fee2f91d3ad8
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function match(\$pathinfo)
\$context = \$this->context;
\$request = \$this->request;
\$requestMethod = \$canonicalMethod = \$context->getMethod();
\$schema = \$context->getScheme();
\$scheme = \$context->getScheme();

if ('HEAD' === \$requestMethod) {
\$canonicalMethod = 'GET';
Expand Down Expand Up @@ -337,7 +337,7 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren
$schemes = str_replace("\n", '', var_export(array_flip($schemes), true));
$code .= <<<EOF
\$requiredSchemes = $schemes;
if (!isset(\$requiredSchemes[\$schema])) {
if (!isset(\$requiredSchemes[\$scheme])) {
return \$this->redirect(\$pathinfo, '$name', key(\$requiredSchemes));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function match($pathinfo)
$context = $this->context;
$request = $this->request;
$requestMethod = $canonicalMethod = $context->getMethod();
$schema = $context->getScheme();
$scheme = $context->getScheme();

if ('HEAD' === $requestMethod) {
$canonicalMethod = 'GET';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function match($pathinfo)
$context = $this->context;
$request = $this->request;
$requestMethod = $canonicalMethod = $context->getMethod();
$schema = $context->getScheme();
$scheme = $context->getScheme();

if ('HEAD' === $requestMethod) {
$canonicalMethod = 'GET';
Expand Down Expand Up @@ -330,7 +330,7 @@ public function match($pathinfo)
// secure
if ('/secure' === $pathinfo) {
$requiredSchemes = array ( 'https' => 0,);
if (!isset($requiredSchemes[$schema])) {
if (!isset($requiredSchemes[$scheme])) {
return $this->redirect($pathinfo, 'secure', key($requiredSchemes));
}

Expand All @@ -340,7 +340,7 @@ public function match($pathinfo)
// nonsecure
if ('/nonsecure' === $pathinfo) {
$requiredSchemes = array ( 'http' => 0,);
if (!isset($requiredSchemes[$schema])) {
if (!isset($requiredSchemes[$scheme])) {
return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function match($pathinfo)
$context = $this->context;
$request = $this->request;
$requestMethod = $canonicalMethod = $context->getMethod();
$schema = $context->getScheme();
$scheme = $context->getScheme();

if ('HEAD' === $requestMethod) {
$canonicalMethod = 'GET';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function match($pathinfo)
$context = $this->context;
$request = $this->request;
$requestMethod = $canonicalMethod = $context->getMethod();
$schema = $context->getScheme();
$scheme = $context->getScheme();

if ('HEAD' === $requestMethod) {
$canonicalMethod = 'GET';
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.