• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2128 (tree)
Zeit2018-01-07 21:41:03
Autorumethyl

Log Message

URL::Combine()

Ändern Zusammenfassung

Diff

--- trunk/include/functions.php (revision 2127)
+++ trunk/include/functions.php (revision 2128)
@@ -386,7 +386,12 @@
386386 return Text::Parse($url, self::DELIMITER);
387387 }
388388
389- //結合
389+ //結合 (URL)
390+ public static function Combine(...$list) {
391+ return ArrayFilter::Concat($list, self::DELIMITER);
392+ }
393+
394+ //結合 (パラメータ)
390395 public static function Concat(array $list) {
391396 return ArrayFilter::Concat($list, self::ADD);
392397 }
--- trunk/include/html/controller/test/objection_test_html_class.php (revision 2127)
+++ trunk/include/html/controller/test/objection_test_html_class.php (revision 2128)
@@ -4,7 +4,7 @@
44 //フォーム出力
55 public static function OutputForm(array $stack) {
66 $url = 'objection_test.php';
7- $image = JINROU_ROOT . '/' . GameConfig::OBJECTION_IMAGE;
7+ $image = URL::Combine(JINROU_ROOT, GameConfig::OBJECTION_IMAGE);
88
99 Text::Printf(HTML::GetP(), HTML::GenerateLink($url, ObjectionTestMessage::RESET));
1010 TableHTML::OutputHeader(null, false);
--- trunk/include/media/icon_class.php (revision 2127)
+++ trunk/include/media/icon_class.php (revision 2128)
@@ -6,7 +6,7 @@
66 static $path;
77
88 if (true === is_null($path)) {
9- $path = JINROU_ROOT . '/' . IconConfig::PATH . '/';
9+ $path = URL::Combine(JINROU_ROOT, IconConfig::PATH, '');
1010 }
1111 return $path;
1212 }
@@ -16,22 +16,22 @@
1616 return self::GetPath() . $file;
1717 }
1818
19- //死亡アイコン取得
19+ //死亡アイコンパス取得
2020 public static function GetDead() {
2121 static $path;
2222
2323 if (true === is_null($path)) {
24- $path = JINROU_IMG . '/' . IconConfig::$dead;
24+ $path = URL::Combine(JINROU_IMG, IconConfig::$dead);
2525 }
2626 return $path;
2727 }
2828
29- //人狼アイコン取得
29+ //人狼アイコンパス取得
3030 public static function GetWolf() {
3131 static $path;
3232
3333 if (true === is_null($path)) {
34- $path = JINROU_IMG . '/' . IconConfig::$wolf;
34+ $path = URL::Combine(JINROU_IMG, IconConfig::$wolf);
3535 }
3636 return $path;
3737 }
Show on old repository browser