/**
* @param string $uri URI path to find filters for
*
* @return array{before: list<string>, after: list<string>} array of filter alias or classname
*/
public function find(string
$uri): array
{ $this->filters->
reset();
// Add route filters
try { $routeFilters =
$this->
getRouteFilters($uri);
$this->filters->
enableFilters($routeFilters, 'before'
);
$this->filters->
enableFilters($routeFilters, 'after'
);
$this->filters->
initialize($uri);
return $this->filters->
getFilters();
} catch (RedirectException
$e) { return [ 'before' =>
[],
'after' =>
[],
];
}