PHP Class eZ\Publish\Core\REST\Common\RequestParser\Pattern
Handles 2 types of patterns to be used in an URL:
- {foo} matches anything but a slash and is used to match the typical URL
variable (e.g. an ID)
- {&foo} matches the slash, too, and is used to match only those URL
variables, which may have a slash
Mostrar archivo
Open project: ezsystems/ezpublish-kernel
Class Usage Examples
Protected Properties
Public Methods
Protected Methods
Method |
Description |
|
compile ( string $pattern ) : string |
Compiles a given pattern to a PCRE regular expression. |
|
Method Details
__construct()
public method
Construct from optional initial map.
addPattern()
public method
Adds a pattern for a type.
compile()
protected method
Compiles a given pattern to a PCRE regular expression.
Generate a URL of the given type from the specified values.
Parse URL and return the IDs contained in the URL.
parseHref()
public method
Property Details
$compileCache protected_oe property
Cache for compiled expressions.
protected array $compileCache |
return |
array |
|
$map protected_oe property
Map of URL types to their URL patterns.
protected array $map |
return |
array |
|