mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 07:18:39 +00:00
Standardize with javascript
This commit is contained in:
parent
cb9ee501d0
commit
c3e60a3070
|
|
@ -33,6 +33,7 @@ use phpOMS\Datatypes\Enum;
|
||||||
abstract class BrowserType extends Enum
|
abstract class BrowserType extends Enum
|
||||||
{
|
{
|
||||||
const IE = 'msie'; /* Internet Explorer */
|
const IE = 'msie'; /* Internet Explorer */
|
||||||
|
const EDGE = 'edge'; /* Internet Explorer Edge 20+ */
|
||||||
const FIREFOX = 'firefox'; /* Firefox */
|
const FIREFOX = 'firefox'; /* Firefox */
|
||||||
const SAFARI = 'safari'; /* Safari */
|
const SAFARI = 'safari'; /* Safari */
|
||||||
const CHROME = 'chrome'; /* Chrome */
|
const CHROME = 'chrome'; /* Chrome */
|
||||||
|
|
@ -41,4 +42,5 @@ abstract class BrowserType extends Enum
|
||||||
const MAXTHON = 'maxthon'; /* Maxthon */
|
const MAXTHON = 'maxthon'; /* Maxthon */
|
||||||
const KONQUEROR = 'konqueror'; /* Konqueror */
|
const KONQUEROR = 'konqueror'; /* Konqueror */
|
||||||
const HANDHELD = 'mobile'; /* Handheld Browser */
|
const HANDHELD = 'mobile'; /* Handheld Browser */
|
||||||
|
const BLINK = 'blink'; /* Blink Browser */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ use phpOMS\Uri\UriInterface;
|
||||||
*/
|
*/
|
||||||
abstract class RequestAbstract implements MessageInterface
|
abstract class RequestAbstract implements MessageInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uri.
|
* Uri.
|
||||||
*
|
*
|
||||||
|
|
@ -51,6 +50,14 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
*/
|
*/
|
||||||
protected $method = null;
|
protected $method = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected $type = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Root.
|
* Root.
|
||||||
*
|
*
|
||||||
|
|
@ -218,6 +225,34 @@ abstract class RequestAbstract implements MessageInterface
|
||||||
return $this->path[$key] ?? null;
|
return $this->path[$key] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set request type.
|
||||||
|
*
|
||||||
|
* E.g. M_JSON
|
||||||
|
*
|
||||||
|
* @param string $type Request type
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function setType(string $type)
|
||||||
|
{
|
||||||
|
$this->type = $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get request type.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function getType() : string
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user