mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 05:38:39 +00:00
Optimize order
This commit is contained in:
parent
b424eb67bf
commit
d48d65fe86
|
|
@ -191,18 +191,6 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
return json_encode($this->toArray());
|
return json_encode($this->toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Json serialize.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function jsonSerialize()
|
|
||||||
{
|
|
||||||
return $this->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
@ -216,4 +204,16 @@ class Group implements ArrayableInterface, \JsonSerializable
|
||||||
'members' => $this->members,
|
'members' => $this->members,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Json serialize.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function jsonSerialize()
|
||||||
|
{
|
||||||
|
return $this->toArray();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
* @link http://orange-management.com
|
* @link http://orange-management.com
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace phpOMS\Account;
|
namespace phpOMS\Account;
|
||||||
use phpOMS\Account\PermissionType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* InfoManager class.
|
* InfoManager class.
|
||||||
|
|
@ -124,90 +124,6 @@ abstract class PermissionAbstract
|
||||||
return $this->unit;
|
return $this->unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get app name.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getApp() /* : ?string */
|
|
||||||
{
|
|
||||||
return $this->app;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get module id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getModule() /* : ?int */
|
|
||||||
{
|
|
||||||
return $this->module;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get providing module id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getFrom() /* : ?int */
|
|
||||||
{
|
|
||||||
return $this->from;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get type.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getType() /* : ?int */
|
|
||||||
{
|
|
||||||
return $this->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get element id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getElement() /* : ?int */
|
|
||||||
{
|
|
||||||
return $this->element;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get component id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getComponent() /* : ?int */
|
|
||||||
{
|
|
||||||
return $this->component;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get permission
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function getPermission() : int
|
|
||||||
{
|
|
||||||
return $this->permission;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set unit id.
|
* Set unit id.
|
||||||
*
|
*
|
||||||
|
|
@ -222,6 +138,18 @@ abstract class PermissionAbstract
|
||||||
$this->unit = $unit;
|
$this->unit = $unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get app name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getApp() /* : ?string */
|
||||||
|
{
|
||||||
|
return $this->app;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set app name.
|
* Set app name.
|
||||||
*
|
*
|
||||||
|
|
@ -236,6 +164,18 @@ abstract class PermissionAbstract
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getModule() /* : ?int */
|
||||||
|
{
|
||||||
|
return $this->module;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set module id.
|
* Set module id.
|
||||||
*
|
*
|
||||||
|
|
@ -250,6 +190,18 @@ abstract class PermissionAbstract
|
||||||
$this->module = $module;
|
$this->module = $module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get providing module id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getFrom() /* : ?int */
|
||||||
|
{
|
||||||
|
return $this->from;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set providing module id.
|
* Set providing module id.
|
||||||
*
|
*
|
||||||
|
|
@ -264,6 +216,18 @@ abstract class PermissionAbstract
|
||||||
$this->from = $from;
|
$this->from = $from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get type.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getType() /* : ?int */
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set type.
|
* Set type.
|
||||||
*
|
*
|
||||||
|
|
@ -278,6 +242,18 @@ abstract class PermissionAbstract
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get element id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getElement() /* : ?int */
|
||||||
|
{
|
||||||
|
return $this->element;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set element id.
|
* Set element id.
|
||||||
*
|
*
|
||||||
|
|
@ -292,6 +268,18 @@ abstract class PermissionAbstract
|
||||||
$this->element = $element;
|
$this->element = $element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get component id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getComponent() /* : ?int */
|
||||||
|
{
|
||||||
|
return $this->component;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set component id.
|
* Set component id.
|
||||||
*
|
*
|
||||||
|
|
@ -306,6 +294,18 @@ abstract class PermissionAbstract
|
||||||
$this->component = $component;
|
$this->component = $component;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get permission
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getPermission() : int
|
||||||
|
{
|
||||||
|
return $this->permission;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set permission.
|
* Set permission.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user