URL::Combine()
@@ -386,7 +386,12 @@ | ||
386 | 386 | return Text::Parse($url, self::DELIMITER); |
387 | 387 | } |
388 | 388 | |
389 | - //結合 | |
389 | + //結合 (URL) | |
390 | + public static function Combine(...$list) { | |
391 | + return ArrayFilter::Concat($list, self::DELIMITER); | |
392 | + } | |
393 | + | |
394 | + //結合 (パラメータ) | |
390 | 395 | public static function Concat(array $list) { |
391 | 396 | return ArrayFilter::Concat($list, self::ADD); |
392 | 397 | } |
@@ -4,7 +4,7 @@ | ||
4 | 4 | //フォーム出力 |
5 | 5 | public static function OutputForm(array $stack) { |
6 | 6 | $url = 'objection_test.php'; |
7 | - $image = JINROU_ROOT . '/' . GameConfig::OBJECTION_IMAGE; | |
7 | + $image = URL::Combine(JINROU_ROOT, GameConfig::OBJECTION_IMAGE); | |
8 | 8 | |
9 | 9 | Text::Printf(HTML::GetP(), HTML::GenerateLink($url, ObjectionTestMessage::RESET)); |
10 | 10 | TableHTML::OutputHeader(null, false); |
@@ -6,7 +6,7 @@ | ||
6 | 6 | static $path; |
7 | 7 | |
8 | 8 | if (true === is_null($path)) { |
9 | - $path = JINROU_ROOT . '/' . IconConfig::PATH . '/'; | |
9 | + $path = URL::Combine(JINROU_ROOT, IconConfig::PATH, ''); | |
10 | 10 | } |
11 | 11 | return $path; |
12 | 12 | } |
@@ -16,22 +16,22 @@ | ||
16 | 16 | return self::GetPath() . $file; |
17 | 17 | } |
18 | 18 | |
19 | - //死亡アイコン取得 | |
19 | + //死亡アイコンパス取得 | |
20 | 20 | public static function GetDead() { |
21 | 21 | static $path; |
22 | 22 | |
23 | 23 | if (true === is_null($path)) { |
24 | - $path = JINROU_IMG . '/' . IconConfig::$dead; | |
24 | + $path = URL::Combine(JINROU_IMG, IconConfig::$dead); | |
25 | 25 | } |
26 | 26 | return $path; |
27 | 27 | } |
28 | 28 | |
29 | - //人狼アイコン取得 | |
29 | + //人狼アイコンパス取得 | |
30 | 30 | public static function GetWolf() { |
31 | 31 | static $path; |
32 | 32 | |
33 | 33 | if (true === is_null($path)) { |
34 | - $path = JINROU_IMG . '/' . IconConfig::$wolf; | |
34 | + $path = URL::Combine(JINROU_IMG, IconConfig::$wolf); | |
35 | 35 | } |
36 | 36 | return $path; |
37 | 37 | } |