api/laravel/Routing/SortedMiddleware.yaml
2024-09-26 02:03:21 -07:00

85 lines
1.7 KiB
YAML

name: SortedMiddleware
class_comment: null
dependencies:
- name: Collection
type: class
source: Illuminate\Support\Collection
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: priorityMap
- name: middlewares
comment: '# * Create a new Sorted Middleware container.
# *
# * @param array $priorityMap
# * @param \Illuminate\Support\Collection|array $middlewares
# * @return void'
- name: sortMiddleware
visibility: protected
parameters:
- name: priorityMap
- name: middlewares
comment: '# * 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'
- name: priorityMapIndex
visibility: protected
parameters:
- name: priorityMap
- name: middleware
comment: '# * Calculate the priority map index of the middleware.
# *
# * @param array $priorityMap
# * @param string $middleware
# * @return int|null'
- name: middlewareNames
visibility: protected
parameters:
- name: middleware
comment: '# * Resolve the middleware names to look for in the priority array.
# *
# * @param string $middleware
# * @return \Generator'
- name: moveMiddleware
visibility: protected
parameters:
- name: middlewares
- name: from
- name: to
comment: '# * Splice a middleware into a new position and remove the old entry.
# *
# * @param array $middlewares
# * @param int $from
# * @param int $to
# * @return array'
traits:
- Illuminate\Support\Collection
interfaces: []