Merge branch 'develop' of https://github.com/Karaka-Management/phpOMS into develop

This commit is contained in:
Dennis Eichhorn 2022-11-06 18:32:28 +01:00
commit 92200f82b2
4 changed files with 13 additions and 12 deletions

View File

@ -317,9 +317,9 @@ final class Argument implements UriInterface
/**
* {@inheritdoc}
*/
public function getPathElement(int $pos = 0) : string
public function getPathElement(int $pos = 0, bool $useOffset = true) : string
{
return $this->pathElements[$pos + $this->pathOffset] ?? '';
return $this->pathElements[$pos + ($useOffset ? $this->pathOffset : 0)] ?? '';
}
/**

View File

@ -384,9 +384,9 @@ final class HttpUri implements UriInterface
/**
* {@inheritdoc}
*/
public function getPathElement(int $pos = 0) : string
public function getPathElement(int $pos = 0, bool $useOffset = true) : string
{
return $this->pathElements[$pos + $this->pathOffset] ?? '';
return $this->pathElements[$pos + ($useOffset ? $this->pathOffset : 0)] ?? '';
}
/**

View File

@ -117,13 +117,14 @@ interface UriInterface
/**
* Get path element.
*
* @param int $pos Position of the path
* @param int $pos Position of the path
* @param int $useOffset Uses internal path offset
*
* @return string
*
* @since 1.0.0
*/
public function getPathElement(int $pos = 0) : string;
public function getPathElement(int $pos = 0, bool $useOffset = true) : string;
/**
* Get path elements.

View File

@ -236,7 +236,7 @@ $CONFIG = [
'mssql' => [
'admin' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */
@ -246,7 +246,7 @@ $CONFIG = [
],
'insert' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */
@ -256,7 +256,7 @@ $CONFIG = [
],
'select' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */
@ -266,7 +266,7 @@ $CONFIG = [
],
'update' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */
@ -276,7 +276,7 @@ $CONFIG = [
],
'delete' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */
@ -286,7 +286,7 @@ $CONFIG = [
],
'schema' => [
'db' => 'mssql', /* db type */
'host' => '127.0.0.1', /* db host address */
'host' => 'localhost', /* db host address */
'port' => '1433', /* db host port */
'login' => 'sa', /* db login name */
'password' => 'c0MplicatedP@ssword', /* db login password */