mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
改进Model类的__isset方法 支持获取器判断
This commit is contained in:
@@ -1151,7 +1151,13 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
return isset($this->data[$name]);
|
||||
if (isset($this->data[$name])) {
|
||||
return true;
|
||||
} elseif ($this->__get($name)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user