Airship\Engine\AutoPilot::makePath PHP Method

makePath() public static method

Replace {token}s with their regex stand-ins.
public static makePath ( string $string ) : string
$string string
return string
    public static function makePath(string $string) : string
    {
        return \str_replace(['{_any}', '{_id}', '{_year}', '{_month}', '{_day}', '{_isodate}', '{_lower}', '{_upper}', '{_page}', '{_slug}', '{_uslug}', '{_lslug}', '{_string}', '{_hex}', '{any}', '{id}', '{year}', '{month}', '{day}', '{isodate}', '{lower}', '{upper}', '{slug}', '{uslug}', '{lslug}', '{string}', '{hex}'], ['(?:/(.*))?', '(?:/([0-9]+))?', '(?:/([0-9]{4}))?', '(?:/([01][0-9]))?', '(?:/([0-9]{4}\\-[01][0-9]\\-[0-3][0-9]))?', '(?:/([0-3][0-9]))?', '(?:/([a-z]+))?', '(?:/([A-Z]+))?', '(?:/([0-9]*))?', '(?:/([A-Za-z0-9_\\-]+))?', '(?:/([A-Z0-9_\\-]+))?', '(?:/([0-9a-z\\-]+))?', '(?:/([^/\\?]+))?', '(?:/([0-9a-fA-F]+))?', '(.*)', '([0-9]+)', '([0-9]{4})', '([01][0-9])', '([0-3][0-9])', '([0-9]{4}\\-[01][0-9]\\-[0-3][0-9])', '([a-z]+)', '([A-Z]+)', '([A-Za-z0-9_\\-]+)', '([A-Z0-9_\\-]+)', '([0-9a-z\\-]+)', '([^/\\?]+)', '([0-9a-fA-F]+)'], $string);
    }