32 lines
804 B
PHP
32 lines
804 B
PHP
<?php
|
|
|
|
namespace lib\Models;
|
|
|
|
use lib\Core\Model as Core;
|
|
|
|
abstract class CommonModel extends Core
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
} //
|
|
// self:: → 컴파일 타임에 결정되므로 BaseModel의 상수를 참조하게 됨.
|
|
// static:: → 실행 타임에 결정되므로 상속받은 클래스의 상수를 참조함.
|
|
final public function getTable(): string
|
|
{
|
|
return constant("static::TABLE");
|
|
}
|
|
final public function getPKField(): string
|
|
{
|
|
return constant("static::PKField");
|
|
}
|
|
final public function getTitleField(): string
|
|
{
|
|
return constant("static::TitleField");
|
|
}
|
|
final public function getPairField(): string
|
|
{
|
|
return constant("static::PairField");
|
|
}
|
|
} //Class
|