Automationn init...
This commit is contained in:
parent
a45ee256e4
commit
ca0a0a57ad
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Controllers\Admin;
|
namespace App\Controllers\Admin;
|
||||||
|
|
||||||
use App\Controllers\BaseController;
|
abstract class AdminController
|
||||||
|
|
||||||
abstract class AdminController extends BaseController
|
|
||||||
{
|
{
|
||||||
private $_datas = [];
|
private $_datas = [];
|
||||||
|
|
||||||
|
|||||||
@ -6,37 +6,37 @@ use CodeIgniter\Entity\Entity;
|
|||||||
|
|
||||||
class UserEntity extends CommonEntity
|
class UserEntity extends CommonEntity
|
||||||
{
|
{
|
||||||
public function __toString()
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
return "{$this->getPK()}:{$this->getID()}:{$this->getName()},{$this->getLevel()}/{$this->getPoint()}";
|
return "{$this->getPK()}:{$this->getID()}:{$this->getName()},{$this->getLevel()}/{$this->getPoint()}";
|
||||||
}
|
}
|
||||||
public function getPK()
|
public function getPK(): int
|
||||||
{
|
{
|
||||||
return $this->attributes['pid'];
|
return $this->attributes['pid'];
|
||||||
}
|
}
|
||||||
public function getName()
|
public function getName(): string
|
||||||
{
|
{
|
||||||
return $this->attributes['user_name'];
|
return $this->attributes['user_name'];
|
||||||
}
|
}
|
||||||
public function getID()
|
public function getID(): string
|
||||||
{
|
{
|
||||||
return $this->attributes['user_id'];
|
return $this->attributes['user_id'];
|
||||||
}
|
}
|
||||||
public function getPoint()
|
public function getPoint(): int
|
||||||
{
|
{
|
||||||
return $this->attributes['user_point'];
|
return $this->attributes['user_point'];
|
||||||
}
|
}
|
||||||
public function setPoint(int $point)
|
public function setPoint(int $point): void
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->attributes['user_point'] = $point;
|
$this->attributes['user_point'] = $point;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLevel()
|
public function getLevel(): int
|
||||||
{
|
{
|
||||||
return $this->attributes['user_level'];
|
return $this->attributes['user_level'];
|
||||||
}
|
}
|
||||||
public function setLevel(int $level)
|
public function setLevel(int $level): void
|
||||||
{
|
{
|
||||||
$this->attributes['user_level'] = $level;
|
$this->attributes['user_level'] = $level;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user