/
home
/
techb158
/
immovalet.com
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Routing
/
/home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Routing
mkdir
upload
Name
Size
Mode
Actions
Console/
-
0755
rm
Contracts/
-
0755
rm
Events/
-
0755
rm
Exceptions/
-
0755
rm
Matching/
-
0755
rm
Middleware/
-
0755
rm
AbstractRouteCollection.php
7826
0644
edit
dl
rm
CompiledRouteCollection.php
9086
0644
edit
dl
rm
composer.json
1471
0644
edit
dl
rm
Controller.php
1660
0644
edit
dl
rm
ControllerDispatcher.php
2309
0644
edit
dl
rm
ControllerMiddlewareOptions.php
1013
0644
edit
dl
rm
CreatesRegularExpressionRouteConstraints.php
1833
0644
edit
dl
rm
ImplicitRouteBinding.php
2385
0644
edit
dl
rm
LICENSE.md
1075
0644
edit
dl
rm
MiddlewareNameResolver.php
3178
0644
edit
dl
rm
PendingResourceRegistration.php
5631
0644
edit
dl
rm
Pipeline.php
1503
0644
edit
dl
rm
RedirectController.php
1208
0644
edit
dl
rm
Redirector.php
7396
0644
edit
dl
rm
ResourceRegistrar.php
14927
0644
edit
dl
rm
ResponseFactory.php
7769
0644
edit
dl
rm
Route.php
27968
0644
edit
dl
rm
RouteAction.php
3313
0644
edit
dl
rm
RouteBinding.php
2750
0644
edit
dl
rm
RouteCollection.php
7051
0644
edit
dl
rm
RouteCollectionInterface.php
2332
0644
edit
dl
rm
RouteDependencyResolverTrait.php
3470
0644
edit
dl
rm
RouteFileRegistrar.php
641
0644
edit
dl
rm
RouteGroup.php
2664
0644
edit
dl
rm
RouteParameterBinder.php
3118
0644
edit
dl
rm
Router.php
35536
0644
edit
dl
rm
RouteRegistrar.php
6605
0644
edit
dl
rm
RouteSignatureParameters.php
1457
0644
edit
dl
rm
RouteUri.php
1330
0644
edit
dl
rm
RouteUrlGenerator.php
9296
0644
edit
dl
rm
RoutingServiceProvider.php
6084
0644
edit
dl
rm
SortedMiddleware.php
3664
0644
edit
dl
rm
UrlGenerator.php
19888
0644
edit
dl
rm
ViewController.php
869
0644
edit
dl
rm
Edit:
/home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Routing/SortedMiddleware.php
(3664B)
<?php namespace Illuminate\Routing; use Illuminate\Support\Collection; class SortedMiddleware extends Collection { /** * Create a new Sorted Middleware container. * * @param array $priorityMap * @param \Illuminate\Support\Collection|array $middlewares * @return void */ public function __construct(array $priorityMap, $middlewares) { if ($middlewares instanceof Collection) { $middlewares = $middlewares->all(); } $this->items = $this->sortMiddleware($priorityMap, $middlewares); } /** * Sort the middlewares by the given priority map. * * Each call to this method makes one discrete middleware movement if necessary. * * @param array $priorityMap * @param array $middlewares * @return array */ protected function sortMiddleware($priorityMap, $middlewares) { $lastIndex = 0; foreach ($middlewares as $index => $middleware) { if (! is_string($middleware)) { continue; } $priorityIndex = $this->priorityMapIndex($priorityMap, $middleware); if (! is_null($priorityIndex)) { // This middleware is in the priority map. If we have encountered another middleware // that was also in the priority map and was at a lower priority than the current // middleware, we will move this middleware to be above the previous encounter. if (isset($lastPriorityIndex) && $priorityIndex < $lastPriorityIndex) { return $this->sortMiddleware( $priorityMap, array_values($this->moveMiddleware($middlewares, $index, $lastIndex)) ); } // This middleware is in the priority map; but, this is the first middleware we have // encountered from the map thus far. We'll save its current index plus its index // from the priority map so we can compare against them on the next iterations. $lastIndex = $index; $lastPriorityIndex = $priorityIndex; } } return Router::uniqueMiddleware($middlewares); } /** * Calculate the priority map index of the middleware. * * @param array $priorityMap * @param string $middleware * @return int|null */ protected function priorityMapIndex($priorityMap, $middleware) { foreach ($this->middlewareNames($middleware) as $name) { $priorityIndex = array_search($name, $priorityMap); if ($priorityIndex !== false) { return $priorityIndex; } } } /** * Resolve the middleware names to look for in the priority array. * * @param string $middleware * @return \Generator */ protected function middlewareNames($middleware) { $stripped = head(explode(':', $middleware)); yield $stripped; $interfaces = @class_implements($stripped); if ($interfaces !== false) { foreach ($interfaces as $interface) { yield $interface; } } } /** * Splice a middleware into a new position and remove the old entry. * * @param array $middlewares * @param int $from * @param int $to * @return array */ protected function moveMiddleware($middlewares, $from, $to) { array_splice($middlewares, $to, 0, $middlewares[$from]); unset($middlewares[$from + 1]); return $middlewares; } }
Save
cmd:
run