mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
Validate类支持读取模型类的属性定义完成验证
This commit is contained in:
@@ -1817,4 +1817,18 @@ class Model
|
||||
}
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取属性值
|
||||
* @access protected
|
||||
* @param string $property 属性名
|
||||
* @return mixed
|
||||
*/
|
||||
public function getProperty($property)
|
||||
{
|
||||
if (property_exists($this, $property)) {
|
||||
return $this->$property;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user