-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method to return connection parameters
This adds a method to the ServiceProviderInterface to return the current connection settings. `GeneralUtility::makeInstance(SolrServiceProvider::class)->getConnectionSettings()` will return a `Connection` object. Related: #176
- Loading branch information
Showing
3 changed files
with
140 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Subugoe\Find\Domain\Model; | ||
|
||
class Connection | ||
{ | ||
private string $searchProvider; | ||
private string $host; | ||
private int $port; | ||
private string $scheme; | ||
private string $core; | ||
private string $path; | ||
|
||
public function getSearchProvider(): string | ||
{ | ||
return $this->searchProvider; | ||
} | ||
|
||
public function setSearchProvider(string $searchProvider): Connection | ||
{ | ||
$this->searchProvider = $searchProvider; | ||
|
||
return $this; | ||
} | ||
|
||
public function getHost(): string | ||
{ | ||
return $this->host; | ||
} | ||
|
||
public function setHost(string $host): Connection | ||
{ | ||
$this->host = $host; | ||
|
||
return $this; | ||
} | ||
|
||
public function getPort(): int | ||
{ | ||
return $this->port; | ||
} | ||
|
||
public function setPort(int $port): Connection | ||
{ | ||
$this->port = $port; | ||
|
||
return $this; | ||
} | ||
|
||
public function getScheme(): string | ||
{ | ||
return $this->scheme; | ||
} | ||
|
||
public function setScheme(string $scheme): Connection | ||
{ | ||
$this->scheme = $scheme; | ||
|
||
return $this; | ||
} | ||
|
||
public function getCore(): string | ||
{ | ||
return $this->core; | ||
} | ||
|
||
public function setCore(string $core): Connection | ||
{ | ||
$this->core = $core; | ||
|
||
return $this; | ||
} | ||
|
||
public function getPath(): string | ||
{ | ||
return $this->path; | ||
} | ||
|
||
public function setPath(string $path): Connection | ||
{ | ||
$this->path = $path; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters