This commit is contained in:
Dennis Eichhorn 2022-11-06 18:14:35 +01:00
parent 1e900f77a5
commit 100e62929c
4 changed files with 19 additions and 18 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,60 +236,60 @@ $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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',
],
'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' => 'R00troot', /* db login password */
'password' => 'c0MplicatedP@ssword', /* db login password */
'database' => 'oms', /* db name */
'weight' => 1000, /* db table prefix */
'datetimeformat' => 'Y-m-d H:i:s',