Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Application/Routers/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ private static function renameKeys(array $arr, array $xlat): array
/**
* camelCaseAction name -> dash-separated.
*/
private static function action2path(string $s): string
public static function action2path(string $s): string
{
$s = preg_replace('#(.)(?=[A-Z])#', '$1-', $s);
$s = strtolower($s);
Expand All @@ -698,7 +698,7 @@ private static function action2path(string $s): string
/**
* dash-separated -> camelCaseAction name.
*/
private static function path2action(string $s): string
public static function path2action(string $s): string
{
$s = preg_replace('#-(?=[a-z])#', ' ', $s);
$s = lcfirst(ucwords($s));
Expand All @@ -710,7 +710,7 @@ private static function path2action(string $s): string
/**
* PascalCase:Presenter name -> dash-and-dot-separated.
*/
private static function presenter2path(string $s): string
public static function presenter2path(string $s): string
{
$s = strtr($s, ':', '.');
$s = preg_replace('#([^.])(?=[A-Z])#', '$1-', $s);
Expand All @@ -723,7 +723,7 @@ private static function presenter2path(string $s): string
/**
* dash-and-dot-separated -> PascalCase:Presenter name.
*/
private static function path2presenter(string $s): string
public static function path2presenter(string $s): string
{
$s = preg_replace('#([.-])(?=[a-z])#', '$1 ', $s);
$s = ucwords($s);
Expand All @@ -736,7 +736,7 @@ private static function path2presenter(string $s): string
/**
* Url encode.
*/
private static function param2path(string $s): string
public static function param2path(string $s): string
{
return str_replace('%2F', '/', rawurlencode($s));
}
Expand Down