mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 22:38:42 +00:00
Fix uri factory init
This commit is contained in:
parent
f0ccfc023a
commit
a2566d3e3c
|
|
@ -133,7 +133,7 @@ class Request extends RequestAbstract
|
||||||
*/
|
*/
|
||||||
private function initCurrentRequest() /* : void */
|
private function initCurrentRequest() /* : void */
|
||||||
{
|
{
|
||||||
$this->uir = new Http(Http::getCurrent());
|
$this->uri = new Http(Http::getCurrent());
|
||||||
$this->data = $_GET ?? [];
|
$this->data = $_GET ?? [];
|
||||||
$this->files = $_FILES ?? [];
|
$this->files = $_FILES ?? [];
|
||||||
$this->language = $this->loadRequestLanguage();
|
$this->language = $this->loadRequestLanguage();
|
||||||
|
|
@ -205,17 +205,7 @@ class Request extends RequestAbstract
|
||||||
*/
|
*/
|
||||||
private function setupUriBuilder() /* : void */
|
private function setupUriBuilder() /* : void */
|
||||||
{
|
{
|
||||||
UriFactory::setQuery('/scheme', $this->uri->getScheme());
|
|
||||||
UriFactory::setQuery('/host', $this->uri->getHost());
|
|
||||||
UriFactory::setQuery('/lang', $this->l11n->getLanguage());
|
UriFactory::setQuery('/lang', $this->l11n->getLanguage());
|
||||||
UriFactory::setQuery('/base', rtrim($this->uri->getBase(), '/'));
|
|
||||||
UriFactory::setQuery('/rootPath', $this->uri->getRootPath());
|
|
||||||
UriFactory::setQuery('?', $this->uri->getQuery());
|
|
||||||
UriFactory::setQuery('%', $this->uri->__toString());
|
|
||||||
UriFactory::setQuery('#', $this->uri->getFragment());
|
|
||||||
UriFactory::setQuery('/', $this->uri->getPath());
|
|
||||||
UriFactory::setQuery(':user', $this->uri->getUser());
|
|
||||||
UriFactory::setQuery(':pass', $this->uri->getPass());
|
|
||||||
|
|
||||||
// todo: flush previous
|
// todo: flush previous
|
||||||
foreach($this->data as $key => $value) {
|
foreach($this->data as $key => $value) {
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,30 @@ class UriFactory
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup uri builder based on current request
|
||||||
|
*
|
||||||
|
* @param UriInterface $uri Uri
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public static function setupUriBuilder(UriInterface $uri) /* : void */
|
||||||
|
{
|
||||||
|
self::setQuery('/scheme', $uri->getScheme());
|
||||||
|
self::setQuery('/host', $uri->getHost());
|
||||||
|
self::setQuery('/base', rtrim($uri->getBase(), '/'));
|
||||||
|
self::setQuery('/rootPath', $uri->getRootPath());
|
||||||
|
self::setQuery('?', $uri->getQuery());
|
||||||
|
self::setQuery('%', $uri->__toString());
|
||||||
|
self::setQuery('#', $uri->getFragment());
|
||||||
|
self::setQuery('/', $uri->getPath());
|
||||||
|
self::setQuery(':user', $uri->getUser());
|
||||||
|
self::setQuery(':pass', $uri->getPass());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear uri component
|
* Clear uri component
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user