class Regex (View source)

Methods

static bool|string
parse(string $str)

Parse string like.: {:[a-z]+:}.domain.com or /user/{:[a-z]+:}/{:\d+:} to regex

static string
args(string $arg)

Convert one argument like {:[a-z]+:} to ([a-z]+), this function is used by Router::parse

Details

static bool|string parse(string $str)

Parse string like.: {:[a-z]+:}.domain.com or /user/{:[a-z]+:}/{:\d+:} to regex

Parameters

string $str

Return Value

bool|string

static string args(string $arg)

Convert one argument like {:[a-z]+:} to ([a-z]+), this function is used by Router::parse

Parameters

string $arg

Return Value

string