mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-25 07:38:40 +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
|
||||
{
|
||||
const IE = 'msie'; /* Internet Explorer */
|
||||
const EDGE = 'edge'; /* Internet Explorer Edge 20+ */
|
||||
const FIREFOX = 'firefox'; /* Firefox */
|
||||
const SAFARI = 'safari'; /* Safari */
|
||||
const CHROME = 'chrome'; /* Chrome */
|
||||
|
|
@ -41,4 +42,5 @@ abstract class BrowserType extends Enum
|
|||
const MAXTHON = 'maxthon'; /* Maxthon */
|
||||
const KONQUEROR = 'konqueror'; /* Konqueror */
|
||||
const HANDHELD = 'mobile'; /* Handheld Browser */
|
||||
const BLINK = 'blink'; /* Blink Browser */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ use phpOMS\Uri\UriInterface;
|
|||
*/
|
||||
abstract class RequestAbstract implements MessageInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Uri.
|
||||
*
|
||||
|
|
@ -51,6 +50,14 @@ abstract class RequestAbstract implements MessageInterface
|
|||
*/
|
||||
protected $method = null;
|
||||
|
||||
/**
|
||||
* Request type.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $type = null;
|
||||
|
||||
/**
|
||||
* Root.
|
||||
*
|
||||
|
|
@ -218,6 +225,34 @@ abstract class RequestAbstract implements MessageInterface
|
|||
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}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user