RouteCollection.php
system/Router/RouteCollection.php
1 class
61 methods
class RouteCollection
__construct
(FileLocatorInterface $locator, Modules $moduleConfig, Routing $routing)
loadRoutes
(string $routesFile = APPPATH . 'Config/Routes.php')
discoverRoutes
()
addPlaceholder
($placeholder, ?string $pattern = null)
getPlaceholders
()
setDefaultNamespace
(string $value)
setDefaultController
(string $value)
setDefaultMethod
(string $value)
setTranslateURIDashes
(bool $value)
setAutoRoute
(bool $value)
set404Override
($callable = null)
get404Override
()
setDefaultConstraint
(string $placeholder)
getDefaultController
()
getDefaultMethod
()
getDefaultNamespace
()
shouldTranslateURIDashes
()
shouldAutoRoute
()
getRoutes
(?string $verb = null, bool $includeWildcard = true)
getRoutesOptions
(?string $from = null, ?string $verb = null)
getHTTPVerb
()
setHTTPVerb
(string $verb)
map
(array $routes = [], ?array $options = null)
add
(string $from, $to, ?array $options = null)
addRedirect
(string $from, string $to, int $status = 302)
isRedirect
(string $routeKey)
getRedirectCode
(string $routeKey)
group
(string $name, ...$params)
resource
(string $name, ?array $options = null)
presenter
(string $name, ?array $options = null)
string
(array $verbs = [], string $from = '', $to = '', ?array $options = null)
get
(string $from, $to, ?array $options = null)
post
(string $from, $to, ?array $options = null)
put
(string $from, $to, ?array $options = null)
delete
(string $from, $to, ?array $options = null)
head
(string $from, $to, ?array $options = null)
patch
(string $from, $to, ?array $options = null)
options
(string $from, $to, ?array $options = null)
cli
(string $from, $to, ?array $options = null)
view
(string $from, string $view, ?array $options = null)
environment
(string $env, Closure $callback)
reverseRoute
(string $search, ...$params)
localizeRoute
(string $route)
isFiltered
(string $search, ?string $verb = null)
getFiltersForRoute
(string $search, ?string $verb = null)
fillRouteParams
(string $from, ?array $params = null)
buildReverseRoute
(string $from, array $params)
replaceLocale
(string $route, ?string $locale = null)
create
(string $verb, string $from, $to, ?array $options = null)
checkHostname
($hostname)
processArrayCallableSyntax
(string $from, array $to)
getMethodParams
(string $from)
checkSubdomains
($subdomains)
determineCurrentSubdomain
()
resetRoutes
()
loadRoutesOptions
(?string $verb = null)
setPrioritize
(bool $enabled = true)
getRegisteredControllers
(?string $verb = '*')
getControllerName
($handler)
useSupportedLocalesOnly
(bool $useOnly)
shouldUseSupportedLocalesOnly
()