Merge branch 'master' of gitee.com:fastadminnet/framework

This commit is contained in:
Karson
2024-03-26 17:19:29 +08:00
15 changed files with 35 additions and 14 deletions

View File

@@ -2276,27 +2276,32 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
}
// JsonSerializable
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
}
// ArrayAccess
#[\ReturnTypeWillChange]
public function offsetSet($name, $value)
{
$this->setAttr($name, $value);
}
#[\ReturnTypeWillChange]
public function offsetExists($name)
{
return $this->__isset($name);
}
#[\ReturnTypeWillChange]
public function offsetUnset($name)
{
$this->__unset($name);
}
#[\ReturnTypeWillChange]
public function offsetGet($name)
{
return $this->getAttr($name);