Skip to content

Commit

Permalink
Merge pull request #152 from p0lemic/allow-reload-sifo-urls
Browse files Browse the repository at this point in the history
Allow force Urls singleton constructor
  • Loading branch information
p0lemic authored Apr 24, 2023
2 parents 20ca350 + 435deab commit 1ca4dd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
composer.lock
.idea
6 changes: 3 additions & 3 deletions src/Sifo/Urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static public function getInstance( $instance_name = null )
return self::$instance[$instance_name];
}

private function __construct( $instance_name )
private function __construct( $instance_name , $force = false)
{
$domains = Domains::getInstance( $instance_name );
$filter_server = FilterServer::getInstance();
Expand Down Expand Up @@ -187,7 +187,7 @@ private function __construct( $instance_name )
self::$path_parts = explode( self::$url_definition['context_separator'], self::$path );

// Default url.config for all languages.
self::$url_config = $this->url_instance_config = Config::getInstance( $instance_name )->getConfig( 'url' );
self::$url_config = $this->url_instance_config = Config::getInstance( $instance_name, $force )->getConfig( 'url' );
}

/**
Expand Down Expand Up @@ -283,7 +283,7 @@ public function reloadUrlConfig($instance_name = null)
$instance_name = Bootstrap::$instance;
}

self::$instance[$instance_name] = new Urls( $instance_name );
self::$instance[$instance_name] = new Urls( $instance_name, true );
}

/**
Expand Down

0 comments on commit 1ca4dd7

Please sign in to comment.