Skip to content

Commit

Permalink
Route: change inflectors visibility to public (nette/application#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakorpar authored and dg committed Feb 3, 2019
1 parent 64db387 commit 5730cc6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Routing/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

0 comments on commit 5730cc6

Please sign in to comment.