36 lines
699 B
PHP
36 lines
699 B
PHP
<?php
|
|
|
|
namespace lib\Services;
|
|
|
|
use lib\Entities\MemberEntity as Entity;
|
|
use lib\Models\MemberModel as Model;
|
|
|
|
class MemberService extends CommonService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
final public function getClassName(): string
|
|
{
|
|
return "Member";
|
|
}
|
|
final public function getClassPath(): string
|
|
{
|
|
return $this->getClassName();
|
|
}
|
|
public function getModelClass(): string
|
|
{
|
|
return Model::class;
|
|
}
|
|
public function getEntityClass(): string
|
|
{
|
|
return Entity::class;
|
|
}
|
|
public function getEntitById(string $id): Entity
|
|
{
|
|
$this->getModel()->where($this->getModel()->getPKField(), $id);
|
|
return $this->getEntity();
|
|
}
|
|
}
|