-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Router
- Rule
October\Rain\Router\Rule
Source: ~/vendor/october/rain/src/Router/Rule.php
Router Rule Object
Public properties
public string $staticUrl
URL with static segments only, dynamic segments are stripped
public array $segments
Pattern segments
public int $staticSegmentCount
The number of static segments found in the pattern
public int $dynamicSegmentCount
The number of dynamic segments found in the pattern
public int $wildSegmentCount
The number of wildcard segments found in the pattern
Protected properties
protected string $ruleName
A named reference for this rule.
protected string $rulePattern
The pattern used to match this rule.
protected function $conditionCallback
Custom condition used when matching this rule.
protected function $afterMatchCallback
Called when this rule is matched.
Public methods
public void __construct(string $name, string $pattern)
Creates a new router rule instance.
Parameters
- string $name
- string $pattern
public callback afterMatch(callback $callback=NULL)
After match callback
Parameters
- callback $callback - Callback function to be used to modify params after a successful match
public callback condition(callback $callback=NULL)
Condition callback
Parameters
- callback $callback - Callback function to be used when providing custom route match conditions
public object name(string $name=NULL)
Unique route name
Parameters
- string $name - Unique name for the router object
public object pattern(string $pattern=NULL)
Route match pattern
Parameters
- string $pattern - Pattern used to match this rule
public boolean resolveUrl(string $url, array &$parameters)
Checks whether a given URL matches a given pattern.
Parameters
- string $url - The URL to check.
- array &$parameters - A reference to a PHP array variable to return the parameter list fetched from URL.
Protected methods
protected array captureWildcardSegments(array &$urlSegments)
Captures and removes every segment of a URL after a wildcard pattern segment is detected, until both collections of segments are the same size.
Parameters
- array &$urlSegments