diff --git a/.gitignore b/.gitignore index a24fca92..f160c7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,11 +29,7 @@ d_pic/*.gif d_pic/*.png d_setting/*.php -!d_setting/*.orig.php -!d_setting/_*.php */d_setting/*.php -!*/d_setting/*.orig.php -!*/d_setting/_*.php **/old/* test.php diff --git a/composer.json b/composer.json index 5915354a..a3236a60 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "monolog/monolog": "^1.23", "firephp/firephp-core": "^0.4.0", "vlucas/valitron": "^1.4", - "php-extended/php-tail": "^2.1" + "php-extended/php-tail": "^2.1", + "pguardiario/phpuri": "^1.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index e79cc3fd..43411eaf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "4b18f5660106f71d2aba7f1dcee07033", + "content-hash": "1753c2c2ad9fe40ecc5c6ae541dd2e78", "packages": [ { "name": "brandonwamboldt/utilphp", @@ -454,6 +454,30 @@ ], "time": "2017-06-19T01:22:40+00:00" }, + { + "name": "pguardiario/phpuri", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/monkeysuffrage/phpuri.git", + "reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/monkeysuffrage/phpuri/zipball/ad0a5ec033fe616cfef55578b9c7f2458be8fbfc", + "reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc", + "shasum": "" + }, + "type": "project", + "autoload": { + "files": [ + "phpuri.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "description": "A php library for converting relative urls to absolute.", + "time": "2015-05-24T09:13:17+00:00" + }, { "name": "php-extended/php-system", "version": "1.3.0", diff --git a/f_install/j_setup_db.php b/f_install/j_setup_db.php index 5fda24eb..70906b49 100644 --- a/f_install/j_setup_db.php +++ b/f_install/j_setup_db.php @@ -12,28 +12,28 @@ $servHost = Util::getReq('serv_host'); $sharedIconPath = Util::getReq('shared_icon_path'); $gameImagePath = Util::getReq('game_image_path'); -if(!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath){ +if (!$host || !$port || !$username || !$password || !$dbName || !$servHost || !$sharedIconPath || !$gameImagePath) { Json::die([ 'result'=>false, 'reason'=>'입력 값이 올바르지 않습니다' ]); } -if(!filter_var($servHost, FILTER_VALIDATE_URL)){ - Json::die([ +if (!filter_var($servHost, FILTER_VALIDATE_URL)) { + Json::die([ 'result'=>false, 'reason'=>'접속 경로가 올바르지 않습니다.' ]); } -if(file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')){ +if (file_exists(ROOT.'/d_setting/RootDB.php') && is_dir(ROOT.'/d_setting/RootDB.php')) { Json::die([ 'result'=>false, 'reason'=>'d_setting/RootDB.php 가 디렉토리입니다' ]); } -if(class_exists('\\sammo\\RootDB')){ +if (class_exists('\\sammo\\RootDB')) { Json::die([ 'result'=>false, 'reason'=>'이미 RootDB.php 파일이 있습니다' @@ -41,35 +41,39 @@ if(class_exists('\\sammo\\RootDB')){ } //파일 권한 검사 -if(file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())){ +if (file_exists(AppConf::getUserIconPathFS()) && !is_dir(AppConf::getUserIconPathFS())) { Json::die([ 'result'=>false, 'reason'=>AppConf::$userIconPath.' 이 디렉토리가 아닙니다' ]); } -if(file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')){ +if (file_exists(ROOT.'/d_log') && !is_dir(ROOT.'/d_log')) { Json::die([ 'result'=>false, 'reason'=>'d_log 가 디렉토리가 아닙니다' ]); } -if(file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')){ +if (file_exists(ROOT.'/d_shared') && !is_dir(ROOT.'/d_shared')) { Json::die([ 'result'=>false, 'reason'=>'d_shared 가 디렉토리가 아닙니다' ]); } -if(!file_exists(ROOT.'/d_setting')){ +if (file_exists(ROOT.'/d_setting') && !is_dir(ROOT.'/d_setting')) { Json::die([ 'result'=>false, - 'reason'=>'d_setting 이 존재하지 않습니다' + 'reason'=>'d_shared 가 디렉토리가 아닙니다' ]); } -if (!file_exists(ROOT.'/d_log') || !file_exists(ROOT.'/d_shared') || !file_exists(AppConf::getUserIconPathFS())) { +if (!file_exists(ROOT.'/d_log') + || !file_exists(ROOT.'/d_shared') + || !file_exists(ROOT.'/d_setting') + || !file_exists(AppConf::getUserIconPathFS()) +) { if (!is_writable(ROOT)) { Json::die([ 'result'=>false, @@ -78,42 +82,46 @@ if (!file_exists(ROOT.'/d_log') || !file_exists(ROOT.'/d_shared') || !file_exist } //기본 파일 생성 - if(!file_exists(AppConf::getUserIconPathFS())){ + if (!file_exists(AppConf::getUserIconPathFS())) { mkdir(AppConf::getUserIconPathFS()); } - if(!file_exists(ROOT.'/d_log')){ + if (!file_exists(ROOT.'/d_log')) { mkdir(ROOT.'/d_log'); } - if(!file_exists(ROOT.'/d_shared')){ + if (!file_exists(ROOT.'/d_setting')) { + mkdir(ROOT.'/d_setting'); + } + + if (!file_exists(ROOT.'/d_shared')) { mkdir(ROOT.'/d_shared'); } } -if(!is_writable(AppConf::getUserIconPathFS())){ +if (!is_writable(AppConf::getUserIconPathFS())) { Json::die([ 'result'=>false, 'reason'=>AppConf::$userIconPath.' 디렉토리의 쓰기 권한이 없습니다' ]); } -if(!is_writable(ROOT.'/d_log')){ +if (!is_writable(ROOT.'/d_log')) { Json::die([ 'result'=>false, 'reason'=>'d_log 디렉토리의 쓰기 권한이 없습니다' ]); } -if(!is_writable(ROOT.'/d_shared')){ +if (!is_writable(ROOT.'/d_shared')) { Json::die([ 'result'=>false, 'reason'=>'d_shared 디렉토리의 쓰기 권한이 없습니다' ]); } -if(!is_writable(ROOT.'/d_setting')){ +if (!is_writable(ROOT.'/d_setting')) { Json::die([ 'result'=>false, 'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다.' @@ -122,28 +130,28 @@ if(!is_writable(ROOT.'/d_setting')){ -if(!file_exists(ROOT.'/d_log/.htaccess')){ +if (!file_exists(ROOT.'/d_log/.htaccess')) { @file_put_contents(ROOT.'/d_log/.htaccess', 'Deny from all'); } -if(!file_exists(ROOT.'/d_setting/.htaccess')){ +if (!file_exists(ROOT.'/d_setting/.htaccess')) { @file_put_contents(ROOT.'/d_setting/.htaccess', 'Deny from all'); } //DB 접근 권한 검사 -$rootDB = new \MeekroDB($host,$username,$password,$dbName,$port,'utf8mb4'); +$rootDB = new \MeekroDB($host, $username, $password, $dbName, $port, 'utf8mb4'); $rootDB->connect_options[MYSQLI_OPT_INT_AND_FLOAT_NATIVE] = true; $rootDB->throw_exception_on_nonsql_error = false; -$rootDB->nonsql_error_handler = function($params){ +$rootDB->nonsql_error_handler = function ($params) { Json::die([ 'result'=>false, 'reason'=>'DB 접속에 실패했습니다.' ]); }; -$rootDB->error_handler = function($params){ +$rootDB->error_handler = function ($params) { Json::die([ 'result'=>false, 'reason'=>'SQL을 제대로 실행하지 못했습니다. DB상태를 확인해 주세요.' @@ -152,12 +160,12 @@ $rootDB->error_handler = function($params){ $mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨. -if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))){ - while(true){ +if ($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))) { + while (true) { if (!$mysqli_obj->more_results()) { break; } - if(!$mysqli_obj->next_result()){ + if (!$mysqli_obj->next_result()) { break; } } @@ -172,16 +180,21 @@ $rootDB->insert('system', array( $globalSalt = bin2hex(random_bytes(16)); +$sharedIconPath = WebUtil::resolveRelativePath($sharedIconPath, $servHost); +$gameImagePath = WebUtil::resolveRelativePath($gameImagePath, $servHost); + $result = Util::generateFileUsingSimpleTemplate( - ROOT.'/d_setting/ServConfig.orig.php', - ROOT.'/d_setting/ServConfig.php',[ + __dir__.'/templates/ServConfig.orig.php', + ROOT.'/d_setting/ServConfig.php', + [ 'serverBasePath'=>$servHost, 'sharedIconPath'=>$sharedIconPath, 'gameImagePath'=>$gameImagePath - ] -, true); + ], + true +); -if($result !== true){ +if ($result !== true) { Json::die([ 'result'=>false, 'reason'=>$result @@ -189,8 +202,47 @@ if($result !== true){ } $result = Util::generateFileUsingSimpleTemplate( - ROOT.'/d_setting/RootDB.orig.php', - ROOT.'/d_setting/RootDB.php',[ + __dir__.'/templates/common_path.orig.js', + ROOT.'/d_shared/common_path.js', + [ + 'serverBasePath'=>$servHost, + 'sharedIconPath'=>$sharedIconPath, + 'gameImagePath'=>$gameImagePath + ], + true +); + +if ($result !== true) { + Json::die([ + 'result'=>false, + 'reason'=>$result + ]); +} + + +$result = Util::generateFileUsingSimpleTemplate( + __dir__.'/templates/common.orig.css', + ROOT.'/d_shared/common.css', + [ + 'serverBasePath'=>$servHost, + 'sharedIconPath'=>$sharedIconPath, + 'gameImagePath'=>$gameImagePath + ], + true +); + +if ($result !== true) { + Json::die([ + 'result'=>false, + 'reason'=>$result + ]); +} + + +$result = Util::generateFileUsingSimpleTemplate( + __dir__.'/templates/RootDB.orig.php', + ROOT.'/d_setting/RootDB.php', + [ 'host'=>$host, 'user'=>$username, 'password'=>$password, @@ -198,9 +250,9 @@ $result = Util::generateFileUsingSimpleTemplate( 'port'=>$port, 'globalSalt'=>$globalSalt, ] -); +); -if($result !== true){ +if ($result !== true) { Json::die([ 'result'=>false, 'reason'=>$result @@ -210,4 +262,4 @@ if($result !== true){ Json::die([ 'result'=>true, 'reason'=>'success' -]); \ No newline at end of file +]); diff --git a/f_install/templates/.htaccess b/f_install/templates/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/f_install/templates/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/d_setting/KakaoKey.orig.php b/f_install/templates/KakaoKey.orig.php similarity index 100% rename from d_setting/KakaoKey.orig.php rename to f_install/templates/KakaoKey.orig.php diff --git a/d_setting/RootDB.orig.php b/f_install/templates/RootDB.orig.php similarity index 100% rename from d_setting/RootDB.orig.php rename to f_install/templates/RootDB.orig.php diff --git a/d_setting/ServConfig.orig.php b/f_install/templates/ServConfig.orig.php similarity index 100% rename from d_setting/ServConfig.orig.php rename to f_install/templates/ServConfig.orig.php diff --git a/f_install/templates/common.orig.css b/f_install/templates/common.orig.css new file mode 100644 index 00000000..e41d298d --- /dev/null +++ b/f_install/templates/common.orig.css @@ -0,0 +1,58 @@ +@charset "utf-8"; + +.bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); } +.bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); } +.bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); } + +.img_back {background-image:url('_tK_gameImagePath_/back.jpg'); } + +/* 레거시. */ +#bg0 { background-image:url('_tK_gameImagePath_/back_walnut.jpg'); } +#bg1 { background-image:url('_tK_gameImagePath_/back_green.jpg'); } +#bg2 { background-image:url('_tK_gameImagePath_/back_blue.jpg'); } + +.map_detail .map_title{ + background: + url('_tK_gameImagePath_/ltitle.jpg') no-repeat left, + url('_tK_gameImagePath_/rtitle.jpg') no-repeat right; +} + +.map_detail.map_spring .map_title_text{ + background: + url('_tK_gameImagePath_/ad.gif') no-repeat left, + url('_tK_gameImagePath_/spring.gif') no-repeat right; +} + +.map_detail.map_summer .map_title_text{ + background: + url('_tK_gameImagePath_/ad.gif') no-repeat left, + url('_tK_gameImagePath_/summer.gif') no-repeat right; +} + +.map_detail.map_fall .map_title_text{ + background: + url('_tK_gameImagePath_/ad.gif') no-repeat left, + url('_tK_gameImagePath_/fall.gif') no-repeat right; +} + +.map_detail.map_winter .map_title_text{ + background: + url('_tK_gameImagePath_/ad.gif') no-repeat left, + url('_tK_gameImagePath_/winter.gif') no-repeat right; +} + +.map_spring .map_body{ + background: url('_tK_gameImagePath_/map1.jpg') no-repeat; +} + +.map_summer .map_body{ + background: url('_tK_gameImagePath_/map2.jpg') no-repeat; +} + +.map_fall .map_body{ + background: url('_tK_gameImagePath_/map3.jpg') no-repeat; +} + +.map_winter .map_body{ + background: url('_tK_gameImagePath_/map4.jpg') no-repeat; +} \ No newline at end of file diff --git a/f_install/templates/common_path.orig.js b/f_install/templates/common_path.orig.js new file mode 100644 index 00000000..4918f8ca --- /dev/null +++ b/f_install/templates/common_path.orig.js @@ -0,0 +1,5 @@ +window.pathConfig = { + root:"_tK_serverBasePath_", + sharedIcon:"_tK_sharedIconPath_", + gameImage:"_tK_gameImagePath_" +}; \ No newline at end of file diff --git a/src/sammo/WebUtil.php b/src/sammo/WebUtil.php index 5595c064..5e53b809 100644 --- a/src/sammo/WebUtil.php +++ b/src/sammo/WebUtil.php @@ -12,6 +12,11 @@ class WebUtil return str_replace('.', '\\.', $ip); } + public static function resolveRelativePath(string $path, string $basepath) : string + { + return \phpUri::parse($basepath)->join($path); + } + public static function setHeaderNoCache() { if (!headers_sent()) { diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 20b15c94..325499f6 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -9,5 +9,6 @@ return array( 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + '5b154887902198b16314243c6e0e3e19' => $vendorDir . '/pguardiario/phpuri/phpuri.php', '870dc64919afa8b0f700701bb2c6a783' => $baseDir . '/f_config/config.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index def87f15..78b46bcf 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -10,6 +10,7 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + '5b154887902198b16314243c6e0e3e19' => __DIR__ . '/..' . '/pguardiario/phpuri/phpuri.php', '870dc64919afa8b0f700701bb2c6a783' => __DIR__ . '/../..' . '/f_config/config.php', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 4e27ebce..c2931551 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -463,6 +463,32 @@ "psr-3" ] }, + { + "name": "pguardiario/phpuri", + "version": "1.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/monkeysuffrage/phpuri.git", + "reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/monkeysuffrage/phpuri/zipball/ad0a5ec033fe616cfef55578b9c7f2458be8fbfc", + "reference": "ad0a5ec033fe616cfef55578b9c7f2458be8fbfc", + "shasum": "" + }, + "time": "2015-05-24T09:13:17+00:00", + "type": "project", + "installation-source": "dist", + "autoload": { + "files": [ + "phpuri.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "description": "A php library for converting relative urls to absolute." + }, { "name": "php-extended/php-system", "version": "1.3.0", diff --git a/vendor/pguardiario/phpuri/README.md b/vendor/pguardiario/phpuri/README.md new file mode 100644 index 00000000..bf4cb63b --- /dev/null +++ b/vendor/pguardiario/phpuri/README.md @@ -0,0 +1,18 @@ +Phpuri +========= + +A php library for converting relative urls to absolute. + +```php +require 'phpuri.php'; +echo phpUri::parse('https://www.google.com/')->join('foo'); +//==> https://www.google.com/foo +``` + +### Benchmark +
+php test.php
+rel2abs:         successes -> 26, failures => 9, elapsed time: 0.001301
+url_to_absolute: successes -> 32, failures => 3, elapsed time: 0.0029089999999999
+phpuri:          successes -> 35, failures => 0, elapsed time: 0.002402
+
\ No newline at end of file diff --git a/vendor/pguardiario/phpuri/composer.json b/vendor/pguardiario/phpuri/composer.json new file mode 100644 index 00000000..e1d1fbc7 --- /dev/null +++ b/vendor/pguardiario/phpuri/composer.json @@ -0,0 +1,11 @@ +{ + "name": "pguardiario/phpuri", + "type": "project", + "version": "1.0", + "description": "A php library for converting relative urls to absolute.", + "autoload" : { + "files": [ + "phpuri.php" + ] + } +} diff --git a/vendor/pguardiario/phpuri/phpuri.php b/vendor/pguardiario/phpuri/phpuri.php new file mode 100644 index 00000000..75c9bf52 --- /dev/null +++ b/vendor/pguardiario/phpuri/phpuri.php @@ -0,0 +1,197 @@ + + * echo phpUri::parse('https://www.google.com/')->join('foo'); + * //==> https://www.google.com/foo + * + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @author P Guardiario + * @version 1.0 + */ + + /** + * phpUri + */ + class phpUri + { + + /** + * http(s):// + * @var string + */ + public $scheme; + + /** + * www.example.com + * @var string + */ + public $authority; + + /** + * /search + * @var string + */ + public $path; + + /** + * ?q=foo + * @var string + */ + public $query; + + /** + * #bar + * @var string + */ + public $fragment; + + private function __construct( $string ) + { + preg_match_all( '/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $string, $m ); + $this->scheme = $m[ 2 ][ 0 ]; + $this->authority = $m[ 4 ][ 0 ]; + + /** + * CHANGE: + * @author Dominik Habichtsberg + * @since 24 Mai 2015 10:02 Uhr + * + * Former code: $this->path = ( empty( $m[ 5 ][ 0 ] ) ) ? '/' : $m[ 5 ][ 0 ]; + * No tests failed, when the path is empty. + * With the former code, the relative urls //g and #s failed + */ + $this->path = $m[ 5 ][ 0 ]; + $this->query = $m[ 7 ][ 0 ]; + $this->fragment = $m[ 9 ][ 0 ]; + } + + private function to_str() + { + $ret = ''; + if ( !empty( $this->scheme ) ) + { + $ret .= "{$this->scheme}:"; + } + + if ( !empty( $this->authority ) ) + { + $ret .= "//{$this->authority}"; + } + + $ret .= $this->normalize_path( $this->path ); + + if ( !empty( $this->query ) ) + { + $ret .= "?{$this->query}"; + } + + if ( !empty( $this->fragment ) ) + { + $ret .= "#{$this->fragment}"; + } + + return $ret; + } + + private function normalize_path( $path ) + { + if ( empty( $path ) ) + { + return ''; + } + + $normalized_path = $path; + $normalized_path = preg_replace( '`//+`', '/', $normalized_path, -1, $c0 ); + $normalized_path = preg_replace( '`^/\\.\\.?/`', '/', $normalized_path, -1, $c1 ); + $normalized_path = preg_replace( '`/\\.(/|$)`', '/', $normalized_path, -1, $c2 ); + + /** + * CHANGE: + * @author Dominik Habichtsberg + * @since 24 Mai 2015 10:05 Uhr + * changed limit form -1 to 1, because climbing up the directory-tree failed + */ + $normalized_path = preg_replace( '`/[^/]*?/\\.\\.(/|$)`', '/', $normalized_path, 1, $c3 ); + $num_matches = $c0 + $c1 + $c2 + $c3; + + return ( $num_matches > 0 ) ? $this->normalize_path( $normalized_path ) : $normalized_path; + } + + /** + * Parse an url string + * + * @param string $url the url to parse + * + * @return phpUri + */ + public static function parse( $url ) + { + $uri = new phpUri( $url ); + + return $uri; + } + + /** + * Join with a relative url + * + * @param string $relative the relative url to join + * + * @return string + */ + public function join( $relative ) + { + $uri = new phpUri( $relative ); + switch ( TRUE ) + { + case !empty( $uri->scheme ): + break; + + case !empty( $uri->authority ): + break; + + case empty( $uri->path ): + $uri->path = $this->path; + if ( empty( $uri->query ) ) + { + $uri->query = $this->query; + } + break; + + case strpos( $uri->path, '/' ) === 0: + break; + + default: + $base_path = $this->path; + if ( strpos( $base_path, '/' ) === FALSE ) + { + $base_path = ''; + } + else + { + $base_path = preg_replace( '/\/[^\/]+$/', '/', $base_path ); + } + if ( empty( $base_path ) && empty( $this->authority ) ) + { + $base_path = '/'; + } + $uri->path = $base_path . $uri->path; + } + + if ( empty( $uri->scheme ) ) + { + $uri->scheme = $this->scheme; + if ( empty( $uri->authority ) ) + { + $uri->authority = $this->authority; + } + } + + return $uri->to_str(); + } + } \ No newline at end of file