Zend\Mvc\Router\Http\Segment
Segment route.
Synopsis
class Segment
implements
RouteInterface
{
- // members
- protected array $cacheEncode;
- protected array $urlencodeCorrectionMap;
- protected array $parts;
- protected string $regex;
- protected array $paramMap;
- protected array $defaults;
- protected array $assembledParams;
- protected array $translationKeys;
- // methods
- public void __construct()
- public static Segment factory()
- protected array parseRouteDefinition()
- protected string buildRegex()
- protected string buildPath()
- public RouteMatch|null match()
- public mixed assemble()
- public array getAssembledParams()
- protected string encode()
- protected string decode()
Hierarchy
Implements
Members
protected
- $assembledParams
—
array
List of assembled parameters. - $cacheEncode
—
array
Cache for the encode output. - $defaults
—
array
Default values. - $paramMap
—
array
Map from regex groups to parameter names. - $parts
—
array
Parts of the route. - $regex
—
string
Regex used for matching the route. - $translationKeys
—
array
Translation keys used in the regex. - $urlencodeCorrectionMap
—
array
Map of allowed special chars in path segments.
Methods
protected
- buildPath() — Build a path.
- buildRegex() — Build the matching regex from parsed parts.
- decode() — Decode a path segment.
- encode() — Encode a path segment.
- parseRouteDefinition() — Parse a route definition.
public
- __construct() — Create a new regex route.
- assemble() — assemble(): Defined by RouteInterface interface.
- factory() — factory(): defined by RouteInterface interface.
- getAssembledParams() — getAssembledParams(): defined by RouteInterface interface.
- match() — match(): defined by RouteInterface interface.