Skip to content

Commit

Permalink
Allow force Urls singleton constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Roman committed Apr 24, 2023
1 parent 6ea6737 commit 435deab
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 435deab

Please sign in to comment.